chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
@@ -0,0 +1,194 @@
|
||||
<!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">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<style>
|
||||
.kh_list-container{background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
||||
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
||||
.kh_list-container .img{height:250px;line-height:250px;width:188px;z-index:1;overflow:hidden;}
|
||||
.kh_info{background-color:#000;}
|
||||
.kh_info_left{float:left;height:50px;line-height:50px;padding-top:8px;padding-left:4px;}
|
||||
.kh_info_left .yph{float:left;width:40px;height:40px;line-height:40px;background:#666;text-align:center;border-radius:25px;-moz-border-radius:25px;-webkit-border-radius:25px;color:#ffffff;font-weight:bold;}
|
||||
.kh_info_left .kh{color:#333;float:left;font-size:14px;font-weight:bold;height:40px;line-height:40px;margin-left:10px;}
|
||||
.kh_info_right{float:right;padding-top:8px;padding-right:4px;height:50px;line-height:50px;text-align:right;}
|
||||
.kh_info_right .price{height:40px;line-height:40px;text-align:center;color:#333;font-size:14px;font-weight:bold;}
|
||||
.div_search{top: 0px;left: 0;width: 100%;height: 55px;z-index:999;background-color:#fff;border-bottom:1px solid #eee;}
|
||||
</style>
|
||||
</head>
|
||||
<body style="width:100%;background-color:#fff;overflow:hidden;">
|
||||
<div class="layui-fluid" style="padding:0;">
|
||||
|
||||
<div class="div_search" id="div_search" style="width:100%;">
|
||||
<div style="width:100%;float:left;height:50px;margin-top:10px;min-width:700px;">
|
||||
<form class="layui-form" id="form1_search" action="admin.htm">
|
||||
<div class="layui-input-inline" style="float:left;height:38px;padding-left:10px;"><input type="text" name="s_keyword" id="s_keyword" placeholder="款号或圆牌号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<div id="select_bc" class="layui-input-inline" style="float:left;width:120px;"></div>
|
||||
<div id="select_category" class="layui-input-inline" style="float:left;width:120px;"></div>
|
||||
<div id="change_this" class="layui-input-inline" style="float:left;">
|
||||
<input type="checkbox" id="check_pic" name="check_pic" lay-skin="switch" lay-filter="check_pic" lay-text="缺图片|缺图片">
|
||||
</div>
|
||||
<div class="layui-input-inline" style="float:left;height:38px;line-height:38px;"> <button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 开始分析 </button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space10" id="edt_msg_content" style="width:98%;margin:0 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;"></div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function show_kh_color(kh,khid){
|
||||
layui.use(['form','layer'],function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $=layui.jquery;
|
||||
|
||||
var url1="admin_showpic.htm?_a=add&id="+khid;
|
||||
layer.open({
|
||||
id:"picopen_iframe",
|
||||
title:kh+'图片维护',
|
||||
type : 2,
|
||||
area: ['700px','550px'],
|
||||
offset: "c",
|
||||
content : url1,
|
||||
success : function(layero, index){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
var is_mobile="n";
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index','form','user','rate','element','flow'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
var flow = layui.flow;
|
||||
|
||||
if(admin.screen()<2){
|
||||
is_mobile="y";
|
||||
}else{
|
||||
$("body").css("overflow","auto");
|
||||
}
|
||||
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
$("#edt_msg_content").css("height",$(document).height());
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
|
||||
var url="./?_m=admin&_a=getselect"+query_str;
|
||||
var url1="./?_m=admin"+query_str;
|
||||
$.ajax({
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
var json_data=res;
|
||||
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{
|
||||
var html1="";
|
||||
html1+='<select id="s_bc" name="s_bc"><option value="">'+res.select_bc.title+'</option>';
|
||||
var op=res.select_bc.op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==res.select_bc.value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select>';
|
||||
$("#select_bc").html(html1);
|
||||
|
||||
var html1="";
|
||||
html1+='<select id="s_category" name="s_category"><option value="">'+res.select_category.title+'</option>';
|
||||
var op=res.select_category.op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==res.select_category.value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select>';
|
||||
$("#select_category").html(html1);
|
||||
$("#s_keyword").val(res.s_keyword);
|
||||
if(res.check_pic=="on"){
|
||||
$("#check_pic").attr('checked',"checked");
|
||||
}else{
|
||||
$("#check_pic").removeAttr('checked');
|
||||
}
|
||||
form.render();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
flow.load({
|
||||
elem: '#edt_msg_content'
|
||||
,scrollElem:'#edt_msg_content'
|
||||
,mb:10
|
||||
,end:'<div style="width:100%;height:30px;line-height:30px;clear:both;">加载完成了</div>'
|
||||
,done: function(page, next){
|
||||
//
|
||||
var lis = [];
|
||||
//数据插入
|
||||
$.get(url1+'&page='+page, function(res){
|
||||
var res=$.parseJSON(res);
|
||||
|
||||
for(var i=0;i<res.data.length;i++){
|
||||
var html1='';
|
||||
html1+='<div class="layui-col-lg2 layui-col-md3 layui-col-sm4 layui-col-xs12"><div class="kh_list-container" id="kh_'+res.data[i].id+'">';
|
||||
//图片
|
||||
html1+='<div class="img"><img onclick="show_kh_color(\''+res.data[i].kh+'\',\''+res.data[i].id+'\')" src="'+res.data[i].pic_src+'" width="'+res.data[i].pic_w+'" height="'+res.data[i].pic_h+'"></div><hr>';
|
||||
html1+='<div class="kh_info">';
|
||||
html1+='<div class="kh_info_left">';
|
||||
//圆牌号
|
||||
html1+='<div class="yph">'+res.data[i].yph+'</div>';
|
||||
//款号
|
||||
html1+='<div class="kh">'+res.data[i].kh+'</div>';
|
||||
html1+='</div>';
|
||||
html1+='<div class="kh_info_right"><div class="price">¥'+res.data[i].price+'</div></div>';
|
||||
html1+='</div></div></div>';
|
||||
lis.push(html1);
|
||||
}
|
||||
next(lis.join(''), page < res.pages);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
form.on('switch(check_pic)', function(obj){
|
||||
$('#form1_search').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,146 @@
|
||||
<!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">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<style>
|
||||
.kh_list-container{float:left;width:220px;margin-left:5px;margin-top:5px;background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
||||
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
||||
.kh_list-container .img{height:250px;line-height:250px;width:188px;z-index:1;overflow:hidden;}
|
||||
.divys{color:#333;float:left;font-size:14px;font-weight:bold;height:40px;line-height:40px;margin-left:10px;}
|
||||
</style>
|
||||
</head>
|
||||
<body style="background-color:#ffffff;">
|
||||
<div style="width:100%;" id="other"></div>
|
||||
</body>
|
||||
<script>
|
||||
function del_url(id,color){
|
||||
layui.use(['form','layer'],function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $=layui.jquery;
|
||||
|
||||
layer.confirm('确认删除图片吗?', function(index){
|
||||
var url="./?_m=admin&_a=save_add_image&id="+id+"&c="+color+"&del_pic=y";
|
||||
$.ajax({
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
if(res.code=="100"){
|
||||
parent.location.reload();
|
||||
}
|
||||
layer.close(index);
|
||||
},
|
||||
error: function () {
|
||||
layer.close(index);
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
function set_main(id,color){
|
||||
layui.use(['form','layer'],function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $=layui.jquery;
|
||||
|
||||
layer.confirm('确认设置为主预览图片吗?', function(index){
|
||||
var url="./?_m=admin&_a=set_main_pic&id="+id+"&c="+color;
|
||||
$.ajax({
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
layui.layer.msg("设置成功!");
|
||||
if(res.code=="100"){
|
||||
parent.location.reload();
|
||||
}
|
||||
layer.close(index);
|
||||
},
|
||||
error: function () {
|
||||
layer.close(index);
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
layui.use(['form','layer'],function(){
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
var $=layui.jquery;
|
||||
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var url1="./?_m=admin&_a=add"+query_str;
|
||||
|
||||
$.ajax({
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
var json_data=res;
|
||||
//console.log(res);
|
||||
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;
|
||||
var obj1=window.parent.parent;
|
||||
obj1.location.href=url1;
|
||||
}else if(json_data.code==2){
|
||||
//------------------重新登录
|
||||
url1="login.htm?error_msg="+json_data.msg;
|
||||
var obj1=window.parent.parent;
|
||||
obj1.location.href=url1;
|
||||
}else if(json_data.code==101){
|
||||
layui.layer.alert(res.msg);
|
||||
}else{
|
||||
var html1='';
|
||||
for(var i=0;i<res.data.length;i++){
|
||||
html1+='<div class="kh_list-container">';
|
||||
//图片
|
||||
html1+='<div class="img"><a href="protocol://camera?&_m=admin&_a=save_add_image&id='+res.data[i].id+'&c='+res.data[i].color+'&url='+res.urls+'"><img src="'+res.data[i].pic_src+'" width="'+res.data[i].pic_w+'" height="'+res.data[i].pic_h+'"></a></div><hr>';
|
||||
html1+='<div class="kh_info">';
|
||||
//颜色
|
||||
html1+='<div class="divys" style="width:100px;">#'+res.data[i].color+' '+res.data[i].colortitle+'</div>';
|
||||
if(res.data[i].sign=="y"){
|
||||
html1+='<div class="divys" style="width:40px;"><input type="button" value="删" class="layui-btn layui-btn-danger layui-btn-sm" onclick="del_url(\''+res.data[i].id+'\',\''+res.data[i].color+'\')"/></div>';
|
||||
}
|
||||
if(res.data[i].sign_z=="y"){
|
||||
html1+='<div class="divys" style="width:40px;"><input type="button" value="主" class="layui-btn layui-btn-normal layui-btn-sm" onclick="set_main(\''+res.data[i].id+'\',\''+res.data[i].color+'\')"/></div>';
|
||||
}
|
||||
html1+='</div>';
|
||||
html1+='</div>';
|
||||
}
|
||||
$("#other").html(html1);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,980 @@
|
||||
<!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">
|
||||
|
||||
<script type="text/javascript" language="javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="js/DataTables/jquery.dataTables.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="js/DataTables/dataTables.fixedColumns.min.js"></script>
|
||||
<link rel="stylesheet" href="js/DataTables/jquery.dataTables.css">
|
||||
|
||||
<style>
|
||||
/* 抵消index.css中div的margin样式 */
|
||||
div { margin-left: 0; margin-right: 0;}
|
||||
</style>
|
||||
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
</head>
|
||||
<body style="background-color:#fff;width:100%;">
|
||||
<div class="layui-tab-content">
|
||||
|
||||
|
||||
<div id="detail_show" style="width:100%;margin-top:10px;">
|
||||
|
||||
</div>
|
||||
<div id="showtb">
|
||||
|
||||
</div>
|
||||
<div id="show_table" style="overflow: auto; -webkit-overflow-scrolling: touch;"></div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
|
||||
|
||||
var is_mobile="n";
|
||||
function openDetail(ujs,uname){
|
||||
var index = layui.layer.open({
|
||||
title : "订了"+ujs+"件的衣服",
|
||||
type : 2,
|
||||
offset: 'c',
|
||||
area: ['500px', '500px'],
|
||||
content : "bb_openDetail.htm?s_num="+ujs+"&s_username="+uname,
|
||||
success : function(layero, index){
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// function go_dkhtml(key1,val1){
|
||||
// // dkurl='dk.htm?'+key1+'='+val1;
|
||||
|
||||
// // parent.go_dk(dkurl);
|
||||
// // var layer = parent.layer;
|
||||
// // index_dk_single = parent.layer.open({
|
||||
// // type: 2,
|
||||
// // title: '',
|
||||
// // content: url1+'?khid='+id,
|
||||
// // offset: 'b',
|
||||
// // closeBtn:0,
|
||||
// // anim: 2,
|
||||
// // });
|
||||
// layui.use('layer', function(){
|
||||
|
||||
// parent.layer.full(parent.layer.open({
|
||||
// type: 2,
|
||||
// title: '',
|
||||
// content: 'dk.htm?'+key1+'='+val1+"&frombb=y",
|
||||
// offset: 'b',
|
||||
// closeBtn:0,
|
||||
// anim: 2,
|
||||
// }))
|
||||
// })
|
||||
// }
|
||||
// 跳转至dk.htm
|
||||
function go_dkhtml(param){
|
||||
var url = "dk.htm?"
|
||||
for (var key in param) {
|
||||
url += "&" + key + "=" + param[key]
|
||||
}
|
||||
url += "&frombb=y"
|
||||
layui.use('layer', function(){
|
||||
parent.layer.full(parent.layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: url,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2,
|
||||
}))
|
||||
})
|
||||
}
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['form','index', 'user','rate','element'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$("#LAY_app_body", parent.document).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(".layui-tab-content").width($(this).width() - 20)
|
||||
})
|
||||
|
||||
$(".layui-tab-content").width($("#LAY_app_body", parent.document).width() - 20)
|
||||
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
//---------------------------------------------数据表格
|
||||
var url='./?_m=bb'+query_str;
|
||||
_ajax(url);
|
||||
function _ajax(a_url){
|
||||
layer.load();
|
||||
$.ajax(
|
||||
{
|
||||
url:a_url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
layer.closeAll('loading');
|
||||
var res=$.parseJSON(res);
|
||||
console.log(["初始", res])
|
||||
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
return false
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}
|
||||
if(res.cate=="client"){
|
||||
var html1="";
|
||||
html1+='<div style="margin-top:10px;"><form class="layui-form" id="form1_search">';
|
||||
if(res.show_brand=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_brand"><option value="">-'+res.select_brand.title+'-</option>';
|
||||
var op=res.select_brand.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_brand.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_group_by">';
|
||||
var op=res.select_group_by.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_group_by.value)
|
||||
html1+='selected';
|
||||
html1+='>按'+op[i].title+'分组</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
|
||||
if(res.show_dd=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><input id="s_username" name="s_username" type="text" class="layui-input searchVal" placeholder="客户代码" value="'+res.s_username+'" /></div> ';
|
||||
//
|
||||
html1+='<div class="layui-input-inline" style="width:100px;"><select name="s_is_checked"><option value="">-'+res.select_is_checked.title+'-</option>';
|
||||
var op=res.select_is_checked.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_is_checked.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
|
||||
if(res.show_path_qy=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_path_qy"><option value="">-'+res.select_path_qy.title+'-</option>';
|
||||
var op=res.select_path_qy.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_path_qy.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
|
||||
if(res.show_path_dl=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_path_dl"><option value="">-'+res.select_path_dl.title+'-</option>';
|
||||
var op=res.select_path_dl.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_path_dl.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
|
||||
if(res.show_dpsx=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_dpsx"><option value="">-'+res.select_dpsx.title+'-</option>';
|
||||
var op=res.select_dpsx.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_dpsx.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
|
||||
if(res.show_dj=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_dj"><option value="">-'+res.select_dj.title+'-</option>';
|
||||
var op=res.select_dj.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_dj.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
if(res.show_key=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_key">';
|
||||
var op=res.select_order_flag.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_order_flag.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
}
|
||||
|
||||
html1+='<a id="form1_submit" class="layui-btn layui-btn-normal">开始分析</a>';
|
||||
html1+='</form></div>';
|
||||
$("#detail_show").html(html1);
|
||||
|
||||
var html1='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
if(res.bbtype=="1"){
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan="'+res.tfoot_str.tdnum+'" align="center">合计</td>';
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
if(getzd!='ct' & getzd!='group_by'){
|
||||
html1+="<td>"+res.tfoot_str[getzd]+"</td>";
|
||||
}
|
||||
}
|
||||
html1+='</tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
fixedColumns: {leftColumns: 1},
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
|
||||
}else{
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
if(res.tbody_str[i].xj=='y'){
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan="2" align="center">小计</td>';
|
||||
html1+='<td hidden="hidden"></td>';
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
if(getzd!='group_by2' & getzd!='group_by1'){
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
}
|
||||
html1+='</tr>';
|
||||
}else{
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan="'+res.tfoot_str.tdnum+'" align="center">合计</td>';
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
if(getzd!='group_by2' & getzd!='group_by1'){
|
||||
html1+="<td>"+res.tfoot_str[getzd]+"</td>";
|
||||
}
|
||||
}
|
||||
html1+='</tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
fixedColumns: {leftColumns: 2},
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#form1_submit").click(function(){
|
||||
var dd = "";
|
||||
var tt = $('form').serializeArray();
|
||||
$.each(tt, function() {
|
||||
dd+="&"+this.name+"="+this.value;
|
||||
});
|
||||
|
||||
var url1='./?_m=bb&cate=client'+dd;
|
||||
//console.log(JSON.stringify(url1));
|
||||
_ajax(url1);
|
||||
});
|
||||
form.render();
|
||||
}else if(res.cate=="ks"){
|
||||
|
||||
var html1="";
|
||||
html1+='<form class="layui-form" id="form1_search">';
|
||||
html1+='<div class="layui-input-inline" style="width:200px;"><select name="s_uid" lay-filter="changeone" lay-search><option value="">-'+res.select_client.title+'-</option>';
|
||||
var op=res.select_client.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_client.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
if(res.show_brand=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_brand" lay-filter="changeone"><option value="">-'+res.select_brand.title+'-</option>';
|
||||
var op=res.select_brand.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_brand.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
//
|
||||
if(res.show_spk=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_is_sp" lay-filter="changeone"><option value="">-'+res.select_is_sp.title+'-</option>';
|
||||
var op=res.select_is_sp.op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==res.select_is_sp.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
if(res.show_key=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_key" lay-filter="changeone">';
|
||||
var op=res.select_order_flag.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_order_flag.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
//
|
||||
html1+='<div class="layui-input-inline" style="width:180px;"><select name="s_group_by" lay-filter="changeone">';
|
||||
var op=res.select_bb.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_bb.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
|
||||
html1+='</form>';
|
||||
|
||||
$("#detail_show").html(html1);
|
||||
|
||||
//表体
|
||||
var html1='';
|
||||
if(res.bbcode=="1"){
|
||||
if(res.bbtype=="ks_size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
if(getzd=="js"){
|
||||
html1+='<td><a href="javascript:;" style="color:blue;" onclick="openDetail(\''+res.tbody_str[i].js+'\',\''+res.s_username+'\')">'+res.tbody_str[i][getzd]+'</a></td>';
|
||||
}else{
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='<tr style="background-color:#f2f2f2"><td>'+res.tfoot_str.tal_js+'</td><td>'+res.tfoot_str.tal_kss+'</td><td>'+res.tfoot_str.tal_zb+'</td></tr>';
|
||||
html1+='</tbody>';
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan=2 align=center>合计</td><td>'+res.tfoot_str.js+'</td><td>'+res.tfoot_str.jszb+'</td><td>'+res.tfoot_str.je+'</td><td>'+res.tfoot_str.jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="color"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>颜色</td><td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+='<tr align=center><td>'+res.tbody_str[i].size_group+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
}
|
||||
html1+='<tr align=center style="background-color:#f2f2f2"><td>'+res.tfoot_str.size_group+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tbody>';
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="sx"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>色系</td><td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+='<tr align=center><td>'+res.tbody_str[i].size_group+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
}
|
||||
html1+='<tr align=center style="background-color:#f2f2f2"><td>'+res.tfoot_str.size_group+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tbody>';
|
||||
html1+='</table>';
|
||||
}else{
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>'+res.bb_group_by+'</td><td rowspan=2>均价</td><td colspan=2>设计款数</td><td colspan=2>已订款数</td><td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+='<tr align=center><td>'+res.tbody_str[i].size_group+'</td><td>'+res.tbody_str[i].jjprice+'</td><td>'+res.tbody_str[i].sj_kh+'</td><td>'+res.tbody_str[i].sj_khzb+'</td><td>'+res.tbody_str[i].yd_kh+'</td><td>'+res.tbody_str[i].yd_khzb+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
}
|
||||
html1+='<tr align=center style="background-color:#f2f2f2"><td>'+res.tfoot_str.size_group+'</td><td>'+res.tfoot_str.jjprice+'</td><td>'+res.tfoot_str.sj_kh+'</td><td>'+res.tfoot_str.sj_khzb+'</td><td>'+res.tfoot_str.yd_kh+'</td><td>'+res.tfoot_str.yd_khzb+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tbody>';
|
||||
html1+='</table>';
|
||||
}
|
||||
$("#showtb").html('<iframe id="frame_chart" src="" width="100%" style="height:300px;position:static;"></iframe>');
|
||||
//加载图表
|
||||
var urlchar="chart.php?t="+res.chart_type+"&data_x="+res.chart_data_x+"&data_y="+res.chart_data_y+"&title="+res.chart_title;
|
||||
$("#frame_chart").attr('src',urlchar);
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
fixedColumns: {leftColumns: 1},
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
}else{
|
||||
//二维
|
||||
if(res.bbtype=="size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan=2 align=center>合计</td><td>'+res.tfoot_str.js+'</td><td>'+res.tfoot_str.jszb+'</td><td>'+res.tfoot_str.je+'</td><td>'+res.tfoot_str.jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="ks_size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
if(res.tbody_str[i].isxj=="y"){
|
||||
html1+='<tr style="background-color:#f2f2f2">';
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}else{
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td>合计</td><td>'+res.tfoot_str.js+'</td><td>'+res.tfoot_str.kss+'</td><td>'+res.tfoot_str.zb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}else{
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>'+res.group_by1+'</td><td rowspan=2>'+res.group_by2+'</td>';
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td rowspan=2>均价</td><td colspan=2>设计款数</td><td colspan=2>已订款数</td>';
|
||||
}
|
||||
html1+='<td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center>'
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td>款数</td><td>占比</td><td>款数</td><td>占比</td>';
|
||||
}
|
||||
html1+='<td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
if(res.tbody_str[i].isxj=="y"){
|
||||
html1+='<tr align=center style="background-color:#f2f2f2">';
|
||||
html1+='<td colspan=2>小计</td>';
|
||||
html1+='<td hidden="hidden"></td>';
|
||||
}else{
|
||||
html1+='<tr align=center>';
|
||||
html1+='<td>'+res.tbody_str[i].group_by1+'</td><td>'+res.tbody_str[i].group_by2+'</td>';
|
||||
}
|
||||
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td>'+res.tbody_str[i].jjprice+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td>';
|
||||
}
|
||||
html1+='<td>'+res.tbody_str[i].sj_kss+'</td><td>'+res.tbody_str[i].sj_ksszb+'</td><td>'+res.tbody_str[i].yd_kss+'</td><td>'+res.tbody_str[i].yd_ksszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td colspan=2>合计</td>';
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td>'+res.tfoot_str.jjprice+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td>';
|
||||
}
|
||||
html1+='<td>'+res.tfoot_str.sj_kss+'</td><td>'+res.tfoot_str.sj_ksszb+'</td><td>'+res.tfoot_str.yd_kss+'</td><td>'+res.tfoot_str.yd_ksszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
|
||||
html1+='</table>';
|
||||
}
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
fixedColumns: {leftColumns: 2},
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
}
|
||||
|
||||
form.on('select(changeone)', function(data){
|
||||
var dd = "";
|
||||
var tt = $('form').serializeArray();
|
||||
$.each(tt, function() {
|
||||
dd+="&"+this.name+"="+this.value;
|
||||
});
|
||||
var url1='./?_m=bb&cate=ks'+dd;
|
||||
_ajax(url1);
|
||||
});
|
||||
form.render();
|
||||
}else if(res.cate=="plugin"){
|
||||
//----------------plugin
|
||||
var html1="";
|
||||
html1+='<iframe src="'+res.src+'" frameborder="0" name="plugin_iframe" id="plugin_iframe" width="100%" style="position:static;height:780px;"></iframe>';
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
}else{
|
||||
//----------------其他
|
||||
var html1="";
|
||||
html1+='<div style="margin-top:10px;"><form class="layui-form" id="form1_search">';
|
||||
if(res.is_tjshow=="y"){
|
||||
html1+='<div class="layui-input-inline" style="width:200px;"><select name="s_uid" lay-filter="changeone" lay-search><option value="">-'+res.select_client.title+'-</option>';
|
||||
var op=res.select_client.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_client.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
if(res.show_brand=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_brand" lay-filter="changeone"><option value="">-'+res.select_brand.title+'-</option>';
|
||||
var op=res.select_brand.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_brand.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
if(res.show_spk=='y'){
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_is_sp" lay-filter="changeone"><option value="">-'+res.select_is_sp.title+'-</option>';
|
||||
var op=res.select_is_sp.op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==res.select_is_sp.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
|
||||
if(res.show_key=='y'){
|
||||
|
||||
html1+='<div class="layui-input-inline" style="width:120px;"><select name="s_key" lay-filter="changeone">';
|
||||
var op=res.select_order_flag.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html1+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_order_flag.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
html1+='</div>';
|
||||
$("#detail_show").html(html1);
|
||||
//表体
|
||||
var html1='';
|
||||
if(res.bbcode=="1"){
|
||||
if(res.bbtype=="ks_size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
if(getzd=="js"){
|
||||
html1+='<td><a href="javascript:;" style="color:blue;" onclick="openDetail(\''+res.tbody_str[i].js+'\',\''+res.s_username+'\')">'+res.tbody_str[i][getzd]+'</a></td>';
|
||||
}else{
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td>'+res.tfoot_str.tal_js+'</td><td>'+res.tfoot_str.tal_kss+'</td><td>'+res.tfoot_str.tal_zb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
|
||||
}else if(res.bbtype=="size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan=2 align=center>合计</td><td>'+res.tfoot_str.js+'</td><td>'+res.tfoot_str.jszb+'</td><td>'+res.tfoot_str.je+'</td><td>'+res.tfoot_str.jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="color"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>颜色</td><td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+='<tr align=center>';
|
||||
if(res.face=="4"){
|
||||
html1+='<td><a style="color:blue;" href="javascript:void(0);" onclick="go_dkhtml({\'s_color\':\''+res.tbody_str[i].size_group_bm+'\'})">'+res.tbody_str[i].size_group+'</a></td>';
|
||||
}else{
|
||||
html1+='<td>'+res.tbody_str[i].size_group+'</td>';
|
||||
}
|
||||
html1+='<td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr align=center style="background-color:#f2f2f2"><td>'+res.tfoot_str.size_group+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="sx"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>色系</td><td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+='<tr align=center><td>'+res.tbody_str[i].size_group+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr align=center style="background-color:#f2f2f2"><td>'+res.tfoot_str.size_group+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}else{
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>'+res.bb_group_by+'</td><td rowspan=2>均价</td><td colspan=2>设计款数</td><td colspan=2>已订款数</td><td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+='<tr align=center>';
|
||||
if(res.face=="4"){
|
||||
html1+='<td><a style="color:blue;" href="javascript:void(0);" onclick="go_dkhtml({\'s_'+res.bbcate+'\':\''+res.tbody_str[i].size_group_bm+'\'})">'+res.tbody_str[i].size_group+'</a></td>';
|
||||
}else{
|
||||
html1+='<td>'+res.tbody_str[i].size_group+'</td>';
|
||||
}
|
||||
html1+='<td>'+res.tbody_str[i].jjprice+'</td><td>'+res.tbody_str[i].sj_kh+'</td><td>'+res.tbody_str[i].sj_khzb+'</td><td>'+res.tbody_str[i].yd_kh+'</td><td>'+res.tbody_str[i].yd_khzb+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr align=center style="background-color:#f2f2f2"><td>'+res.tfoot_str.size_group+'</td><td>'+res.tfoot_str.jjprice+'</td><td>'+res.tfoot_str.sj_kh+'</td><td>'+res.tfoot_str.sj_khzb+'</td><td>'+res.tfoot_str.yd_kh+'</td><td>'+res.tfoot_str.yd_khzb+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}
|
||||
$("#showtb").html('<iframe id="frame_chart" src="" width="100%" style="height:300px;position:static;"></iframe>');
|
||||
//加载图表
|
||||
var urlchar="chart.php?t="+res.chart_type+"&data_x="+res.chart_data_x+"&data_y="+res.chart_data_y+"&title="+res.chart_title;
|
||||
$("#frame_chart").attr('src',urlchar);
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
fixedColumns: {leftColumns: 1},
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
}else{
|
||||
//二维
|
||||
if(res.bbtype=="size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2"><td colspan=2 align=center>合计</td><td>'+res.tfoot_str.js+'</td><td>'+res.tfoot_str.jszb+'</td><td>'+res.tfoot_str.je+'</td><td>'+res.tfoot_str.jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}else if(res.bbtype=="ks_size"){
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2">';
|
||||
for(var i=0;i<res.thead_str.length;i++){
|
||||
html1+="<th lay-data=\"{field:'"+res.thead_str[i].zd+"'}\">"+res.thead_str[i].title+"</th>";
|
||||
}
|
||||
html1+='</tr></thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
if(res.tbody_str[i].isxj=="y"){
|
||||
html1+='<tr style="background-color:#f2f2f2">';
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}else{
|
||||
html1+="<tr>";
|
||||
for(var j=0;j<res.thead_str.length;j++){
|
||||
var getzd=res.thead_str[j].zd;
|
||||
html1+="<td>"+res.tbody_str[i][getzd]+"</td>";
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
}
|
||||
html1+='<tr style="background-color:#f2f2f2"><td>合计</td><td>'+res.tfoot_str.js+'</td><td>'+res.tfoot_str.kss+'</td><td>'+res.tfoot_str.zb+'</td></tr>';
|
||||
html1+='</tbody>';
|
||||
html1+='</table>';
|
||||
}else{
|
||||
html1+='<table id="tabledetail" class="cell-border nowrap" width="100%" lay-filter="layui_table" cellspacing="0" cellpadding="0" border="0" class="layui-table">';
|
||||
html1+='<thead><tr style="background-color:#f2f2f2" align=center><td rowspan=2>'+res.group_by1+'</td><td rowspan=2>'+res.group_by2+'</td>';
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td rowspan=2>均价</td><td colspan=2>设计款数</td><td colspan=2>已订款数</td>';
|
||||
}
|
||||
html1+='<td colspan=2>设计款色</td><td colspan=2>已订款色</td><td colspan=2>已订件数</td><td colspan=2>吊牌金额</td></tr>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center>'
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td>款数</td><td>占比</td><td>款数</td><td>占比</td>';
|
||||
}
|
||||
html1+='<td>款数</td><td>占比</td><td>款数</td><td>占比</td><td>件数</td><td>占比</td><td>金额</td><td>占比</td></tr>';
|
||||
html1+='</thead>';
|
||||
html1+='<tbody>';
|
||||
for(var i=0;i<res.tbody_str.length;i++){
|
||||
if(res.tbody_str[i].isxj=="y"){
|
||||
html1+='<tr align=center style="background-color:#f2f2f2">';
|
||||
html1+='<td colspan=2>小计</td>';
|
||||
html1+='<td hidden="hidden"></td>';
|
||||
}else{
|
||||
html1+='<tr align=center>';
|
||||
html1+='<td>'+res.tbody_str[i].group_by1+'</td><td>'+res.tbody_str[i].group_by2+'</td>';
|
||||
}
|
||||
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td>'+res.tbody_str[i].jjprice+'</td><td>'+res.tbody_str[i].sj_ks+'</td><td>'+res.tbody_str[i].sj_kszb+'</td><td>'+res.tbody_str[i].yd_ks+'</td><td>'+res.tbody_str[i].yd_kszb+'</td>';
|
||||
}
|
||||
html1+='<td>'+res.tbody_str[i].sj_kss+'</td><td>'+res.tbody_str[i].sj_ksszb+'</td><td>'+res.tbody_str[i].yd_kss+'</td><td>'+res.tbody_str[i].yd_ksszb+'</td><td>'+res.tbody_str[i].yd_js+'</td><td>'+res.tbody_str[i].yd_jszb+'</td><td>'+res.tbody_str[i].yd_je+'</td><td>'+res.tbody_str[i].yd_jezb+'</td></tr>';
|
||||
|
||||
}
|
||||
html1+='</tbody>';
|
||||
html1+='<tfoot>';
|
||||
html1+='<tr style="background-color:#f2f2f2" align=center><td colspan=2>合计</td>';
|
||||
if(res.thead_ts=="y"){
|
||||
html1+='<td>'+res.tfoot_str.jjprice+'</td><td>'+res.tfoot_str.sj_ks+'</td><td>'+res.tfoot_str.sj_kszb+'</td><td>'+res.tfoot_str.yd_ks+'</td><td>'+res.tfoot_str.yd_kszb+'</td>';
|
||||
}
|
||||
html1+='<td>'+res.tfoot_str.sj_kss+'</td><td>'+res.tfoot_str.sj_ksszb+'</td><td>'+res.tfoot_str.yd_kss+'</td><td>'+res.tfoot_str.yd_ksszb+'</td><td>'+res.tfoot_str.yd_js+'</td><td>'+res.tfoot_str.yd_jszb+'</td><td>'+res.tfoot_str.yd_je+'</td><td>'+res.tfoot_str.yd_jezb+'</td></tr>';
|
||||
html1+='</tfoot>';
|
||||
html1+='</table>';
|
||||
}
|
||||
$("#show_table").html(html1);
|
||||
|
||||
$('#tabledetail').DataTable({
|
||||
fixedHeader: true, //固定表头
|
||||
fixedColumns: {leftColumns: 2},
|
||||
bFilter: false, //关闭搜索框
|
||||
bLengthChange: false, //去掉每页显示多少条数据下拉框
|
||||
paging: false, //禁止分页
|
||||
info:false, //去掉底部的文字
|
||||
bSort:false, //禁止排序
|
||||
"scrollY": "500px",
|
||||
"scrollX": true,
|
||||
"scrollCollapse": true, //开启滚动条
|
||||
});
|
||||
}
|
||||
|
||||
form.render();
|
||||
form.on('select(changeone)', function(data){
|
||||
var dd = "";
|
||||
var tt = $('form').serializeArray();
|
||||
$.each(tt, function() {
|
||||
dd+="&"+this.name+"="+this.value;
|
||||
});
|
||||
var url1='./?_m=bb&cate='+res.cate+dd;
|
||||
_ajax(url1);
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
layer.closeAll('loading');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
function update_yd() {
|
||||
location.reload()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
<!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="stylesheet" href="layuiadmin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<style type="text/css">
|
||||
.layui-table-cell {
|
||||
height: auto;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="width:100%;"><table id="layui_table" lay-filter="layui_table"></table></div>
|
||||
<script>
|
||||
var tableIns={};
|
||||
layui.use(['form','layer','table','laytpl'],function(){
|
||||
var form = layui.form,
|
||||
layer = layui.layer,
|
||||
$=layui.jquery,
|
||||
laytpl = layui.laytpl,
|
||||
table = layui.table;
|
||||
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
|
||||
//---------------------------------------------数据表格
|
||||
var url='./?_m=bb&cate=openDetail'+query_str;
|
||||
var cols=[];
|
||||
cols[0]={field: 'list', title: '序号', align:"center"};
|
||||
cols[1]={field: 'xh', title: '圆牌号', align:"center"};
|
||||
cols[2]={field: 'kh', title: '款号',align:'center'};
|
||||
cols[3]={field: 'color', title: '颜色',align:'center'};
|
||||
|
||||
var arr_tab=[];
|
||||
tableIns = table.render({
|
||||
even:false,
|
||||
elem: '#layui_table',
|
||||
url : url,
|
||||
cellMinWidth:80,
|
||||
page : false,
|
||||
height : "full-40",
|
||||
id : "order_report_openDetailTable",
|
||||
cols : [cols],
|
||||
done: function(res, curr, count){
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,181 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search{width:100%;text-align:left;background-color:#ffffff;height:59px;line-height:59px;}
|
||||
.kh_list-container{background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
||||
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
||||
.kh_list-container .img{height:300px;line-height:300px;width:400px;z-index:1;overflow:hidden;cursor:pointer;}
|
||||
.kh_info{height:40px;line-height:40px;background-color:#f5f5f5;text-align:center;color:#595959;font-size:16px;font-weight:bold;}
|
||||
.kh_info .zsh{}
|
||||
.kh_info .dph{}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
</head>
|
||||
<body>
|
||||
<!--图片列表-->
|
||||
<div class="layui-row u-list" id="edt_kh_content"></div>
|
||||
<script>
|
||||
//是否手机端
|
||||
var is_mobile="n";
|
||||
var index_dk_single="";
|
||||
//更新已订数据
|
||||
function update_yd(){
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
//获取预设数据
|
||||
var url="./?_m=dk&_a=get_wcl&khid=";
|
||||
$.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);
|
||||
},
|
||||
error: function () {
|
||||
//
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
//橱窗详情
|
||||
function cc_single(zsh){
|
||||
layui.use('layer', function(){
|
||||
var layer = parent.layer;
|
||||
index_dk_single = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: 'cc_single.htm?zsh='+zsh,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2
|
||||
});
|
||||
layer.full(index_dk_single);
|
||||
});
|
||||
}
|
||||
//取得瀑布流单款html
|
||||
function get_list_html(data1,content_set){
|
||||
var html1='';
|
||||
html1+='<div class="u-list-item layui-col-lg4 layui-col-md6 layui-col-sm6 layui-col-xs12"><div class="kh_list-container" id="kh_'+data1.id+'">';
|
||||
//---------------图片
|
||||
html1+='<div class="img" onclick="cc_single('+data1.zsh+');" style="background-color:'+content_set+';"><img src="'+data1.pic+'" width="'+data1.pic_w+'" height="'+data1.pic_h+'" watermark></div>';
|
||||
//kh_info
|
||||
html1+='<div class="kh_info">';
|
||||
//---------------展示号
|
||||
html1+='<span class="zsh">'+data1.zsh+' . </span>';
|
||||
//---------------搭配号
|
||||
html1+='<span class="dph">'+data1.title+'</span>';
|
||||
html1+='</div>';
|
||||
//----kh_info
|
||||
html1+='</div></div>';
|
||||
return html1;
|
||||
}
|
||||
//
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','flow'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var page=1;
|
||||
//流加载
|
||||
var flow = layui.flow;
|
||||
//选项数组
|
||||
flow.load({
|
||||
elem: '#edt_kh_content'
|
||||
,scrollElem:'#edt_kh_content'
|
||||
,end:'<div style=\'width:100%;height:30px;line-height:30px;clear:both;\'>加载完成了</div>'
|
||||
,done: function(page, next){
|
||||
var lis = [];
|
||||
var url1='./?_m=cc&page='+page+query_str;
|
||||
//alert(url1);
|
||||
$.get(url1,function(res){
|
||||
json_data=$.parseJSON(res);
|
||||
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{
|
||||
//加载图片列表
|
||||
var data=json_data.content_list;
|
||||
var html1='';
|
||||
for(var i=0;i<data.length;i++){
|
||||
html1=get_list_html(data[i],json_data.content_set);
|
||||
var elem = $(html1)
|
||||
USetWatermark({
|
||||
el: elem,
|
||||
is_sy: json_data.is_sy,
|
||||
text: json_data.username,
|
||||
mode: "outer"
|
||||
})
|
||||
lis.push(elem[0].outerHTML)
|
||||
}
|
||||
next(lis.join(''), page<json_data.total_page);
|
||||
// 限制图片宽度防止超出父元素尺寸
|
||||
$(".kh_list-container .img").css("max-width", $(".kh_list-container").width())
|
||||
$(".kh_list-container .img img").css("max-width", $(".kh_list-container").width())
|
||||
//
|
||||
total_page=json_data.total_page;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//
|
||||
form.on('select(select_single)', function(data){
|
||||
$("#form1_submit").click();
|
||||
});
|
||||
//提交
|
||||
form.on("submit(form1_submit)",function(data){
|
||||
$("#form1_submit").focus();
|
||||
return true;
|
||||
});
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height()-60)
|
||||
//监听屏幕旋转
|
||||
// resize和orientationchange的不同:
|
||||
// resize: 监听尺寸变化,orientationchange:监听移动端横竖屏切换
|
||||
// orientationchange:宽高为切换前宽高,需延时才能获取切换后的宽高
|
||||
$(window).on("orientationchange", function() {
|
||||
if(index_dk_single)
|
||||
parent.layer.full(index_dk_single)
|
||||
setTimeout(function() {
|
||||
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height() - 60)
|
||||
}, 100)
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,471 @@
|
||||
<!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">
|
||||
<style>
|
||||
.pcki-page {overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch;}
|
||||
#content #info .title{color: #9b9b9b; text-align: right;}
|
||||
#content #info .text{font-weight: bold; text-align: left;}
|
||||
#ccs td>div {padding: 1px;}
|
||||
.kh_list-container {position: relative;}
|
||||
.kh_list-container .kh_hide{display:none;min-width:100%;position:absolute;right:0px;bottom:23px;background:#f5f5f5;filter:alpha(Opacity=90);-moz-opacity:0.9;opacity: 0.9;}
|
||||
.kh_list-container .kh_hide table {margin: auto;}
|
||||
#ccs .-body input { max-width: 80px; margin: auto;}
|
||||
</style>
|
||||
<!-- jquery -->
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- 引入 -->
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
<!-- p_custom_keyboard js -->
|
||||
<link rel="stylesheet" href="js/p_custom_keyboard/p_custom_keyboard.css">
|
||||
<script src="js/p_custom_keyboard/p_custom_keyboard.js"></script>
|
||||
<!-- viewer js -->
|
||||
<script src="js/viewer/viewer.min.js"></script>
|
||||
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="pcki-page">
|
||||
<!-- 顶部标题栏 -->
|
||||
<div class="state_bar">
|
||||
<div class="text_title">橱窗详情</div>
|
||||
<div class="btn_close" onclick="close_this_frame();"><img src="images/close.png" width=30 height=30 border=0></div>
|
||||
</div>
|
||||
<!--头部 上下款 搜索-->
|
||||
<div class="header">
|
||||
<a id="btn-prev" class="-btn-into" style="position: absolute; top: 0; left: 20px;"><i class="layui-icon layui-icon-left"></i>上一组</a>
|
||||
<div id="s-title" class="layui-input-inline" style="width: 20%; margin-right: 10px; max-width: 150px; min-width: 100px;"><input type="text" name="" placeholder="橱窗号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<a id="btn-search" class="layui-btn layui-input-inline" style="border-radius:10px 10px 10px 10px; background-color: #F04122; padding: 0 10px;">查询</a>
|
||||
<a id="btn-next" class="-btn-into" style="position: absolute; top: 0; right: 20px;">下一组<i class="layui-icon layui-icon-right"></i></a>
|
||||
</div>
|
||||
<!-- 信息层 -->
|
||||
<div id="content" style="padding: 0 10px;">
|
||||
<div class="" style="margin-top: 20px; margin-bottom: 20px;">
|
||||
<div id="pic" style="width: 400px; height: 300px; line-height: 300px; box-shadow: 1px 1px 10px 3px #d0d0d0;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<div id="cc-option" style="text-align: left; padding: 0 10px;">
|
||||
<label for="batch-input" style="vertical-align: middle;">批量</label>
|
||||
<input id="batch-input" type="number" class="layui-input" style="width: 80px; height: 30px; vertical-align: middle; display: inline-block; text-align: center; margin-right: 10px;">
|
||||
<button id="batch-cover" class="layui-btn layui-btn-sm lyaui-inline" style="vertical-align: middle; background-color: #F04122;">应用</button>
|
||||
<button id="batch-reset" class="layui-btn layui-btn-sm lyaui-inline layui-btn-primary" style="vertical-align: middle; border-color: #F04122; color: #F04122;">还原</button>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<form class="layui-form">
|
||||
<!-- 单款详细 -->
|
||||
<input id="zsh" name="zsh" style="display: none;">
|
||||
<input id="uid" name="uid" style="display: none;">
|
||||
<table id="ccs" class="pck-input-wrapper" style="width: 96%; margin: auto;"></table>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 保存 -->
|
||||
<div id="cc-opt-box" style="text-align: right;">
|
||||
<a href="javascript:void(0)" id="cc-save" lay-submit lay-filter="cc-save" class="layui-btn" style="background-color: #F04122; margin-right: 10px;">保存订单</a>
|
||||
<hr class="layui-bg-gray">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var is_mobile="n"
|
||||
,cc_data
|
||||
,original_dd = ""
|
||||
,to_page_zsh
|
||||
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','rate'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form
|
||||
,rate = layui.rate
|
||||
|
||||
var url="./?_m=cc&_a=single&zsh="+get_url_param("zsh");
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
//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;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else if(json_data.code==2){
|
||||
//------------------重新登录
|
||||
url1="login.htm?error_msg="+json_data.msg;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else if (json_data.code == 102) {
|
||||
if (json_data.msg) layui.layer.msg(json_data.msg)
|
||||
else layui.layer.msg("数据获取失败。")
|
||||
} else {
|
||||
//------------------填充内容
|
||||
console.log(["初始", json_data])
|
||||
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
|
||||
cc_data = json_data
|
||||
//------------上一组
|
||||
if (json_data.prev != "") {
|
||||
$("#btn-prev").attr("href", "javascript:toPage("+json_data.prev+")")
|
||||
} else {
|
||||
$("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一组了。')")
|
||||
}
|
||||
//------------下一组
|
||||
if (json_data.next != "") {
|
||||
$("#btn-next").attr("href", "javascript:toPage("+json_data.next+")")
|
||||
} else {
|
||||
$("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一组了。')")
|
||||
}
|
||||
//------------展示图片
|
||||
$("#content #pic").css("max-width", Math.min($("#content").width()-20, 400))
|
||||
$("#content #pic").append("<img layui-src='"+json_data.pic_big+"' src='"+json_data.pic_big+"' style='width: "+json_data.pic_big_w+"px; height: "+json_data.pic_big_h+"px; max-width: "+Math.min($("#content").width()-20, 400)+"px; max-height: 300px;' watermark>")
|
||||
new Viewer(document.getElementById("pic"), {
|
||||
url: 'data-original'
|
||||
,toolbar: false
|
||||
,title: false
|
||||
,rotatable: false
|
||||
,backdrop: false // 点击非图片层关闭
|
||||
,viewed: function() {
|
||||
USetWatermark({
|
||||
el: $(".viewer-container .viewer-canvas img")
|
||||
,is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
,font_size: 64
|
||||
})
|
||||
}
|
||||
})
|
||||
//------------zsh
|
||||
$("#zsh").val(json_data.zsh)
|
||||
//------------uid
|
||||
$("#uid").val(json_data.uid)
|
||||
//------------单款详细
|
||||
//--------表头
|
||||
var dk_header = "<tr class='-header'>"
|
||||
,col_count = 0 // 表头单元列列数(单元列:长度1的列),用于调整列宽
|
||||
,cm_front_count = 0 // 尺码前列数,用于放置“合计”的位置
|
||||
dk_header += "<td cc-w='4'></td>" // 单款详细
|
||||
col_count += 4
|
||||
cm_front_count++
|
||||
dk_header += "<td cc-w='5' class='-col-cm'></td>" // 尺码
|
||||
col_count += 5
|
||||
dk_header += "<td cc-w='1'></td>" // 小计
|
||||
col_count++
|
||||
dk_header += "</tr>"
|
||||
$("#ccs").append(dk_header)
|
||||
$("#ccs .-header td").each(function() {
|
||||
$(this).width(100/col_count*parseInt($(this).attr("cc-w"))+"%") // 调整列宽
|
||||
})
|
||||
//--------表身
|
||||
var dk_all_total = 0 // 总合计
|
||||
,max_cm_col_count = 0 // 最大尺码列数,用于规范尺码列数样式
|
||||
,is_all_total = false // 当所有data.length == 0时,不显示合计值
|
||||
for (var i = 0; i < json_data.ccs.length; i++) {
|
||||
var dk = json_data.ccs[i] // 行数据
|
||||
,dk_body_elem = "<tr pcki-mode='row' class='-body'>" // 行文本
|
||||
,current_cm_col_count = 0 // 当前行实际尺码列数
|
||||
if (i != 0) $("#ccs").append("<tr class='-line'><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 单款分割线
|
||||
//----列1
|
||||
dk_body_elem += "<td class='layui-row kh_list-container'>"
|
||||
dk_body_elem += "<div class='layui-col-lg4 layui-col-md4 layui-col-sm4 layui-col-xs4 layui-col-xxs12' style=''><a href='javascript: openDkSingle("+dk.khid+")'><div style='width: 60px; height: 60px; line-height: 60px;'><img src='"+dk.pic+"' style='width: "+dk.pic_w+"px; max-height: "+dk.pic_h+"px;' watermark></div></a></div>"
|
||||
// div1 > pic
|
||||
dk_body_elem += "<div class='layui-col-lg8 layui-col-md8 layui-col-sm8 layui-col-xs8 layui-col-xxs12 layui-row' style='text-align: center;'>" // div2
|
||||
dk_body_elem += "<a href='javascript: openDkSingle("+dk.khid+")'><div class='layui-col-lg6 layui-col-md6 layui-col-sm6 layui-col-xs6 layui-col-xxs12'>"+dk.kh+"</div><div class='layui-col-lg6 layui-col-md6 layui-col-sm6 layui-col-xs6 layui-col-xxs12'>"+dk.color+"-"+dk.colort+"</div></a>"
|
||||
// > info
|
||||
//---- > xj_big
|
||||
dk_body_elem += "<div id='kh_hide_"+dk.khid+"' class='kh_hide'>"
|
||||
dk_body_elem += "<div id='div_pj_"+dk.khid+"_icon_big'>"+get_pj_icon(dk.xj,dk.khid,"big","y")+"</div>"
|
||||
dk_body_elem += "<div class='div_button_del_pj' style='display:"+(dk.xj > 0 ? "" : "none")+"; padding: 1px;' id='div_button_del_pj_"+dk.khid+"'><button type='button' id='button_del_pj_"+dk.khid+"' class='layui-btn layui-btn-sm button_del_pj' onclick='del_pj("+dk.khid+")' style='background-color:#F04122;'>删除评价</button></div>"
|
||||
dk_body_elem += "</div>"
|
||||
// end > xj_big
|
||||
dk_body_elem += "<div class='xj' id='div_pj_"+dk.khid+"_icon_mini' onclick='show_hide_kh_hide("+dk.khid+")'>"+get_pj_icon(dk.xj,dk.khid,"mini","n")+"</div>"
|
||||
// > xj_mini
|
||||
dk_body_elem += "</div>"
|
||||
dk_body_elem += "</td>"
|
||||
//----列2
|
||||
var dk_row_total = 0 // 小计
|
||||
dk_body_elem += "<td class='-col-cm'>"
|
||||
for (var j = 0; j < dk.data.length; j++) {
|
||||
var dkl = dk.data[j]
|
||||
dk_body_elem += "<div class='-item' style='display: inline-block; box-sizing: border-box; float: left; max-width: 80px; margin-left: 5px;'><div>"+dkl.cm+"</div><div><input type='number' id='"+dkl.id+"' name='"+dkl.id+"' value='"+dkl.value+"' class='layui-input' style='text-align: center;' pcki-change='changeOrder' pcki-save='saveOrder'></div></div>"
|
||||
dk_row_total += parseInt(dkl.value ? dkl.value : "0")
|
||||
max_cm_col_count = Math.max(max_cm_col_count, ++current_cm_col_count)
|
||||
original_dd += dkl.value + ","
|
||||
}
|
||||
dk_body_elem += "</td>"
|
||||
if (dk.data.length != 0) {
|
||||
dk_body_elem += "<td class='-row-total'><div style='height: 20px;'>小计</div><div class='-value'>"+dk_row_total+"</div></td>"
|
||||
is_all_total = true
|
||||
}
|
||||
dk_all_total += dk_row_total
|
||||
dk_body_elem += "</tr>"
|
||||
$("#ccs").append(dk_body_elem)
|
||||
}
|
||||
$("#ccs .-body .-col-cm .-item").width(100/max_cm_col_count+"%") // 补全表头尺码的跨度
|
||||
pInitCustomKeyboard({
|
||||
pck_enabled: json_data.sys_ck_input,
|
||||
pck_cypm: json_data.cypm,
|
||||
pck_jpty: json_data.jpty,
|
||||
pck_uid: json_data.uid,
|
||||
pck_page: "cc"
|
||||
}) // 键盘初始化
|
||||
//--------表尾
|
||||
$("#ccs").append("<tr><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 分割线
|
||||
var dk_footer = "<tr class='-footer'><td colspan='"+cm_front_count+"' style='text-align: right;'>合计</td>"
|
||||
dk_footer += "<td></td>"
|
||||
if (is_all_total) dk_footer += "<td class='-all-total'>"+dk_all_total+"</td></tr>"
|
||||
$("#ccs").append(dk_footer)
|
||||
//------------订单操作
|
||||
if (json_data.face == "2") $("#cc-opt-box").css("display", "none")
|
||||
|
||||
// 添加水印
|
||||
USetWatermark({
|
||||
is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
})
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
}
|
||||
);
|
||||
|
||||
// 提交订单,保存订单
|
||||
form.on("submit(cc-save)", function(data) {
|
||||
console.log(data.field)
|
||||
original_dd = setDdString()
|
||||
var url="./?_m=cc&_a=save";
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,data: data.field
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(["反馈", res_jsondata])
|
||||
if (res_jsondata.code == 101) {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作成功。")
|
||||
// dk.htm与dk_single.htm应该平行,即dk.htm打开dk_single.htm时,应layer = parent.layer,否则dk_single.htm不能全屏
|
||||
// 所有iframe都应该统一为main.htm的一级子iframe
|
||||
$("iframe", top.document).each(function(index) {
|
||||
if ($(this).attr("name") != window.name && typeof $(this)[0].contentWindow.update_yd == "function")
|
||||
$(this)[0].contentWindow.update_yd()
|
||||
})
|
||||
} else {
|
||||
if (res_jsondata.msg != "") layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
if (to_page_zsh) location.href = "cc_single.htm?zsh=" + to_page_zsh
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
|
||||
//-----------批量,应用
|
||||
$("#cc-option #batch-cover").click(function () {
|
||||
if ($("#ccs #cc-option #batch-input").val() != "") {
|
||||
var batch_value = parseInt($("#cc-option #batch-input").val() ? $("#cc-option #batch-input").val() : "0")
|
||||
,cc_total_total = 0
|
||||
$("#ccs .-body").each(function() {
|
||||
var cc_row_total = 0
|
||||
$(this).find(".-col-cm input").each(function () {
|
||||
$(this).val(batch_value)
|
||||
cc_row_total += batch_value
|
||||
})
|
||||
$(this).find(".-row-total").html(cc_row_total)
|
||||
cc_total_total += cc_row_total
|
||||
})
|
||||
$("#ccs .-footer .-all-total").html(cc_total_total)
|
||||
}
|
||||
})
|
||||
//-----------批量,还原
|
||||
$("#cc-option #batch-reset").click(function () {
|
||||
var cc_total_total = 0
|
||||
$("#ccs .-body").each(function(i) {
|
||||
var cc_row_total = 0
|
||||
$(this).find(".-col-cm input").each(function (j) {
|
||||
var value = parseInt(cc_data.ccs[i].data[j].value ? cc_data.ccs[i].data[j].value : 0)
|
||||
$(this).val(value)
|
||||
cc_row_total += value
|
||||
})
|
||||
$(this).find(".-row-total").html(cc_row_total)
|
||||
cc_total_total += cc_row_total
|
||||
})
|
||||
$("#ccs .-footer .-all-total").html(cc_total_total)
|
||||
})
|
||||
|
||||
// 搜索,橱窗号
|
||||
$("#btn-search").click(function() {
|
||||
if (!$("#s-title input").val().replace(/ /g, "")) return true
|
||||
var url="./?_m=cc&_a=single&s_title="+$("#s-title input").val()
|
||||
console.log(url)
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(res_jsondata)
|
||||
if (res_jsondata.code == 100) {
|
||||
location.href = "javascript:toPage("+res_jsondata.zsh+")"
|
||||
} else if (res_jsondata.code == 101) {
|
||||
var content_html = "<div style='padding: 15px;'>找到以下符合条件的多项,请选择:</div>"
|
||||
for (var i = 0; i < res_jsondata.msg.length; i++) {
|
||||
var msgl = res_jsondata.msg[i]
|
||||
content_html += '<a href="javascript:toPage('+msgl.zsh+')" style="display: block; float: left; width: 60px; padding: 10px; color: blue; text-decoration: underline;">'+msgl.title+'</a>'
|
||||
}
|
||||
layer.open({
|
||||
type: 1
|
||||
,title: false //不显示标题栏
|
||||
,closeBtn: true
|
||||
,area: '300px;'
|
||||
,shade: 0.8
|
||||
,id: 'cc-location' //设定一个id,防止重复弹出
|
||||
// ,btn: ['火速围观', '残忍拒绝']
|
||||
,btnAlign: 'c'
|
||||
,moveType: 1 //拖拽模式,0或者1
|
||||
,content: content_html
|
||||
})
|
||||
} else {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
})
|
||||
|
||||
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
// 将iframe的高度同步为其父元素.layui-layer-iframe的高度
|
||||
$(this).find("[name="+window_name+"]").height($(this).height())
|
||||
})
|
||||
})
|
||||
|
||||
// 修改订单
|
||||
function changeOrder(elem) {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
elem.val(parseInt(elem.val()))
|
||||
if (parseInt(elem.val()) < 0) {
|
||||
layui.layer.msg("数值无效。")
|
||||
elem.val("")
|
||||
}
|
||||
var dk_row_total = 0
|
||||
elem.parents(".-body").find(".-col-cm input").each(function() {
|
||||
dk_row_total += parseInt($(this).val() != "" ? $(this).val() : "0")
|
||||
})
|
||||
elem.parents(".-body").find(".-row-total .-value").html(dk_row_total)
|
||||
var dk_all_total = 0
|
||||
$("#ccs .-body .-row-total .-value").each(function() {
|
||||
dk_all_total += parseInt($(this).html() ? $(this).html() : 0)
|
||||
})
|
||||
$("#ccs .-footer .-all-total").html(dk_all_total)
|
||||
})
|
||||
}
|
||||
// 保存订单
|
||||
function saveOrder() {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
$("#cc-save").click()
|
||||
})
|
||||
}
|
||||
//显示,隐藏评价层
|
||||
function show_hide_kh_hide(id){
|
||||
layui.use('jquery', function(){
|
||||
var $=layui.jquery;
|
||||
$("#kh_hide_"+id).toggle(500);
|
||||
})
|
||||
}
|
||||
function openDkSingle(khid) {
|
||||
layui.use('layer', function(){
|
||||
var layer = parent.layer;
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: "dk_single"+(cc_data.face == "2" ? "_qj" : "")+".htm?khid="+khid,
|
||||
offset: 'b',
|
||||
closeBtn: 0,
|
||||
anim: 2
|
||||
});
|
||||
layer.full(index);
|
||||
})
|
||||
}
|
||||
// 跳转,上一,下一
|
||||
function toPage(zsh) {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
var current_dd = setDdString()
|
||||
if (original_dd !== current_dd) {
|
||||
if (confirm("您修改了订单,但还没有保存,是否保存?")) {
|
||||
to_page_zsh = zsh
|
||||
$("#cc-save").click()
|
||||
}
|
||||
}
|
||||
location.href = "cc_single.htm?zsh=" + zsh
|
||||
})
|
||||
}
|
||||
function setDdString() {
|
||||
var dd_string = ""
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
$("#ccs .-body .-col-cm input").each(function() {
|
||||
dd_string += $(this).val() + ","
|
||||
})
|
||||
})
|
||||
return dd_string
|
||||
}
|
||||
|
||||
// 关闭本frame
|
||||
function close_this_frame() {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
var current_dd = setDdString()
|
||||
if (original_dd !== current_dd) {
|
||||
if (confirm("您修改了订单,但还没有保存,是否保存?")) {
|
||||
$("#cc-save").click()
|
||||
}
|
||||
}
|
||||
u_close_this_div()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
/*
|
||||
参数说明
|
||||
$data_x(如:$data_x=1月,2月,3月)
|
||||
$data_y(如:$data_y=订量,10,20,30|客户数,1,2,3),多组数据用|分隔
|
||||
$t(目前支持pie|bar|line)
|
||||
$title(标题)
|
||||
*/
|
||||
error_reporting(E_ERROR | E_WARNING | E_PARSE);
|
||||
date_default_timezone_set('Asia/Shanghai');
|
||||
$data_x=$_GET["data_x"];
|
||||
$data_y=$_GET["data_y"];
|
||||
$t=$_GET["t"]?$_GET["t"]:"pie";
|
||||
$title=$_GET["title"];
|
||||
$h=$_GET["h"]?$_GET["h"]:0;
|
||||
//格式化数据
|
||||
$str_data_x=$str_data_y=$str_legend="";
|
||||
//
|
||||
$arr1=explode("|",$data_y);
|
||||
$arrx=explode(",",$data_x);
|
||||
if($t=="pie"){
|
||||
for($i=0;$i<count($arrx);$i++){
|
||||
$str_legend.="\"".$arrx[$i]."\",";
|
||||
}
|
||||
}
|
||||
for($i=0;$i<count($arr1);$i++){
|
||||
if($arr1[$i]){
|
||||
$arr2=explode(",",$arr1[$i]);
|
||||
if($t=="pie"){
|
||||
for($j=1;$j<count($arr2);$j++){
|
||||
if($arr2[$j]>=0)
|
||||
$tmp2.="{name:'".$arrx[$j-1]."',value:".$arr2[$j]."},";
|
||||
}
|
||||
$str_data_y.="{name:'".$arr2[0]."',label:{normal: {show: true, position: 'top'}},type:'".$t."',data:[".substr($tmp2,0,-1)."]},";
|
||||
}else if($t=="line"){
|
||||
if($arr2[0])
|
||||
$str_legend.="\"".$arr2[0]."\",";
|
||||
$tmp2=" ";
|
||||
for($j=1;$j<count($arr2);$j++){
|
||||
if($arr2[$j]>=0)
|
||||
$tmp2.=$arr2[$j].",";
|
||||
}
|
||||
$str_data_y.="{name:'".$arr2[0]."',label:{normal: {show: true, position: 'top'}},type:'".$t."', yAxisIndex: ".$i.",data:[".substr($tmp2,0,-1)."]},";
|
||||
}else{
|
||||
if($arr2[0])
|
||||
$str_legend.="\"".$arr2[0]."\",";
|
||||
$tmp2=" ";
|
||||
for($j=1;$j<count($arr2);$j++){
|
||||
if($arr2[$j]>=0)
|
||||
$tmp2.=$arr2[$j].",";
|
||||
}
|
||||
$str_data_y.="{name:'".$arr2[0]."',label:{normal: {show: true, position: 'top'}},type:'".$t."',data:[".substr($tmp2,0,-1)."]},";
|
||||
}
|
||||
}
|
||||
}
|
||||
if($str_data_y)
|
||||
$str_data_y=substr($str_data_y,0,-1);
|
||||
if($str_legend)
|
||||
$str_legend=substr($str_legend,0,-1);
|
||||
//处理data_x
|
||||
for($i=0;$i<count($arrx);$i++){
|
||||
$str_data_x.="\"".$arrx[$i]."\",";
|
||||
}
|
||||
if($str_data_x)
|
||||
$str_data_x=substr($str_data_x,0,-1);
|
||||
?>
|
||||
<!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>echart图表</title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<script src="js/echarts.common.min.js"></script>
|
||||
</head>
|
||||
<body style="background-color:#ffffff;">
|
||||
<div style="width:100%;" id="other"></div>
|
||||
<div style="width:100%;" id="chart"></div>
|
||||
<script type="text/javascript">
|
||||
//自适应高度
|
||||
window.onload = windowHeight();
|
||||
function windowHeight() {
|
||||
var chart_h=<?php echo $h; ?>;
|
||||
var bodyHeight = document.getElementById("chart");
|
||||
if(chart_h==0){
|
||||
var h = document.documentElement.clientHeight;
|
||||
bodyHeight.style.height = (h - 25) + "px";
|
||||
}else{
|
||||
bodyHeight.style.height = chart_h + "px";
|
||||
}
|
||||
}
|
||||
var myChart = echarts.init(document.getElementById('chart'));
|
||||
var title="<?php echo $title; ?>";
|
||||
var t="<?php echo $t; ?>";
|
||||
var data_x=[<?php echo $str_data_x; ?>];
|
||||
var data_y=[<?php echo $str_data_y; ?>];
|
||||
var data_legend=[<?php echo $str_legend; ?>];
|
||||
switch(t){
|
||||
case "pie":
|
||||
var option = {
|
||||
title : {text: title,x:'center'},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: data_legend
|
||||
},
|
||||
series: data_y
|
||||
};
|
||||
break;
|
||||
case "line":
|
||||
var option = {
|
||||
title: {text: title},
|
||||
tooltip : {trigger: 'axis'},
|
||||
legend: {data:data_legend},
|
||||
xAxis: {data:data_x},
|
||||
yAxis: [{type: 'value'},{type: 'value'}],
|
||||
series: data_y
|
||||
};
|
||||
break;
|
||||
case "bar":
|
||||
var option = {
|
||||
title: {text: title},
|
||||
legend: {data:data_legend},
|
||||
xAxis: {data:data_x},
|
||||
yAxis: {type: 'value'},
|
||||
series: data_y
|
||||
};
|
||||
break;
|
||||
}
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,326 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search{width:100%;text-align:left;background-color:#ffffff;height:59px;line-height:59px;}
|
||||
.kh_list-container{background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
||||
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
||||
.kh_list-container .img{height:300px;line-height:300px;width:400px;z-index:1;overflow:hidden;cursor:pointer;}
|
||||
.kh_info{height:40px;line-height:40px;background-color:#f5f5f5;text-align:center;color:#595959;font-size:16px;font-weight:bold;}
|
||||
.kh_info .zsh{}
|
||||
.kh_info .dph{}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
</head>
|
||||
<body>
|
||||
<!--搜索-->
|
||||
<form class="layui-form" name="form1_search" id="form1_search" method="get" action="cl.htm">
|
||||
<div class="search">
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
<span id="select_single"></span>
|
||||
<div class="layui-input-inline" style="width:120px;"><input type="text" id="s_keyword" name="s_keyword" placeholder="款号/圆牌号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<div class="layui-input-inline" style="width:80px;" id="div_clh"><input type="text" id="s_title" name="s_title" placeholder="陈列号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
</div>
|
||||
<!--隐藏的提交按钮-->
|
||||
<div style="position:absolute;top:0px;left:0px;width:0px;height:0px;">
|
||||
<button lay-submit lay-filter="form1_submit" id="form1_submit" class="layui-btn layui-btn-submit" style="width:0px;height:0px;"></button>
|
||||
</div>
|
||||
</form>
|
||||
<!--图片列表-->
|
||||
<div class="layui-row u-list" id="edt_kh_content"></div>
|
||||
<script>
|
||||
//更新已订数据
|
||||
function update_yd(){
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
//获取预设数据
|
||||
var url="./?_m=dk&_a=get_wcl&khid=";
|
||||
$.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);
|
||||
},
|
||||
error: function () {
|
||||
//
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
//自由陈列打开
|
||||
function zycl_single(zsh){
|
||||
layui.use('layer', function(){
|
||||
var url1="zycl.htm";
|
||||
var layer = parent.layer;
|
||||
index_zycl = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: url1+'?zsh='+zsh,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2,
|
||||
id: "cl_single"
|
||||
});
|
||||
layer.full(index_zycl);
|
||||
});
|
||||
}
|
||||
function zycl_btn_click(zsh,thistype){
|
||||
layui.use('layer', function(){
|
||||
var $ = layui.$
|
||||
var layer = parent.layer;
|
||||
if(thistype=="copy"){
|
||||
layer.confirm("确定复制该陈列吗?", {btn: ['确定', '取消'], title: "提示"}, function () {
|
||||
url1="./?_m=zycl&_a=copy&zsh="+zsh;
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'post',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
if(res.cate=="copyok"){
|
||||
parent.layui.layer.msg("复制成功!");
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
parent.layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}else if(thistype=="del"){
|
||||
layer.confirm("确定删除该陈列吗?", {btn: ['确定', '取消'], title: "提示"}, function () {
|
||||
url1="./?_m=zycl&_a=del&zsh="+zsh;
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'post',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
if(res.cate=="delok"){
|
||||
parent.layui.layer.msg("删除成功!");
|
||||
parent.frames["layadmin-iframe"].location.reload();
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
parent.layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}else if(thistype=="edit"){
|
||||
zycl_single(zsh);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
//是否手机端
|
||||
var is_mobile="n";
|
||||
var index_dk_single="";
|
||||
//陈列详情
|
||||
function cl_single(zsh){
|
||||
layui.use('layer', function(){
|
||||
var layer = parent.layer;
|
||||
index_dk_single = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: 'cl_single.htm?zsh='+zsh,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2
|
||||
});
|
||||
layer.full(index_dk_single);
|
||||
});
|
||||
}
|
||||
//取得瀑布流单款html
|
||||
function get_list_html(data1,zycl,content_set){
|
||||
var html1='';
|
||||
html1+='<div class="u-list-item layui-col-lg4 layui-col-md6 layui-col-sm6 layui-col-xs12"><div class="kh_list-container" id="kh_'+data1.id+'">';
|
||||
//---------------图片
|
||||
html1+='<div class="img" onclick="cl_single('+data1.zsh+');" style="background-color:'+content_set+';"><img src="'+data1.pic+'" width="'+data1.pic_w+'" height="'+data1.pic_h+'" watermark></div>';
|
||||
//kh_info
|
||||
html1+='<div class="kh_info">';
|
||||
//---------------展示号
|
||||
html1+='<span class="zsh">'+data1.zsh+' . </span>';
|
||||
//---------------搭配号
|
||||
html1+='<span class="dph">'+data1.title+'</span>';
|
||||
if(zycl=="y"){
|
||||
if(data1.is_my_cl=="n"){
|
||||
html1+='<span><a href="javascript:void(0);" class="layui-btn layui-btn-normal layui-btn-sm" onclick="zycl_btn_click(\''+data1.zsh+'\',\'copy\')">复制</a></span>';
|
||||
}else{
|
||||
html1+='<span><a href="javascript:void(0);" class="layui-btn layui-btn-normal layui-btn-sm" onclick="zycl_btn_click(\''+data1.zsh+'\',\'edit\')">修改</a> </span>';
|
||||
html1+='<span><a href="javascript:void(0);" class="layui-btn layui-btn-danger layui-btn-sm" onclick="zycl_btn_click(\''+data1.zsh+'\',\'del\')">删除</a></span>';
|
||||
}
|
||||
}
|
||||
html1+='</div>';
|
||||
//----kh_info
|
||||
html1+='</div></div>';
|
||||
return html1;
|
||||
}
|
||||
//
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','flow'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var page=1;
|
||||
//流加载
|
||||
var flow = layui.flow;
|
||||
//选项数组
|
||||
flow.load({
|
||||
elem: '#edt_kh_content'
|
||||
,scrollElem:'#edt_kh_content'
|
||||
,end:'<div style=\'width:100%;height:30px;line-height:30px;clear:both;\'>加载完成了</div>'
|
||||
,done: function(page, next){
|
||||
var lis = [];
|
||||
var url1='./?_m=cl&page='+page+query_str;
|
||||
//alert(url1);
|
||||
$.get(url1,function(res){
|
||||
json_data=$.parseJSON(res);
|
||||
console.log(json_data, "初始")
|
||||
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{
|
||||
//
|
||||
var data1=json_data.select_dz;
|
||||
//定制选项
|
||||
var html1="";
|
||||
for(var i=0;i<data1.length;i++){
|
||||
if(data1[i].no=="s_type"){
|
||||
if(json_data.sys_zycl=="y"){
|
||||
html1+='<div class="layui-input-inline" style="width:100px;"><select name="'+data1[i].no+'" lay-filter="select_single"><option value="">-'+data1[i].title+'-</option>';
|
||||
var op=data1[i].op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==data1[i].value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
}else{
|
||||
html1+='<div class="layui-input-inline" style="width:100px;"><select name="'+data1[i].no+'" lay-filter="select_single"><option value="">-'+data1[i].title+'-</option>';
|
||||
var op=data1[i].op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==data1[i].value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
}
|
||||
$("#select_single").html(html1);
|
||||
//圆牌号或款号
|
||||
var s_keyword="";
|
||||
if(json_data.s_keyword)
|
||||
s_keyword=json_data.s_keyword;
|
||||
$("#s_keyword").val(s_keyword);
|
||||
//搭配号
|
||||
var s_title="";
|
||||
if(json_data.s_title)
|
||||
s_title=json_data.s_title;
|
||||
$("#s_title").val(s_title);
|
||||
//自由陈列
|
||||
if(json_data.sys_zycl=="y" && json_data.page <= 1){
|
||||
var html1='';
|
||||
html1+='<div class="layui-input-inline"><a href="javascript:void(0);" onclick="zycl_single(0)"><img src="images/button_zycl.png" style="width:80px;height:30px;" border="0" watermark></a></div>';
|
||||
var elem = $(html1)
|
||||
USetWatermark({
|
||||
el: elem,
|
||||
is_sy: json_data.is_sy,
|
||||
text: json_data.username,
|
||||
mode: "outer"
|
||||
})
|
||||
$("#div_clh").after(html1);
|
||||
}
|
||||
//加载图片列表
|
||||
var data=json_data.content_list;
|
||||
var html1='';
|
||||
for(var i=0;i<data.length;i++){
|
||||
html1=get_list_html(data[i],json_data.sys_zycl,json_data.content_set);
|
||||
var elem = $(html1)
|
||||
USetWatermark({
|
||||
el: elem,
|
||||
is_sy: json_data.is_sy,
|
||||
text: json_data.username,
|
||||
mode: "outer"
|
||||
})
|
||||
lis.push(elem[0].outerHTML)
|
||||
}
|
||||
next(lis.join(''), page<json_data.total_page);
|
||||
// 限制图片宽度防止超出父元素尺寸
|
||||
$(".kh_list-container .img").css("max-width", $(".kh_list-container").width())
|
||||
$(".kh_list-container .img img").css("max-width", $(".kh_list-container").width())
|
||||
//
|
||||
total_page=json_data.total_page;
|
||||
form.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//
|
||||
form.on('select(select_single)', function(data){
|
||||
$("#form1_submit").click();
|
||||
});
|
||||
//提交
|
||||
form.on("submit(form1_submit)",function(data){
|
||||
$("#form1_submit").focus();
|
||||
return true;
|
||||
});
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height()-60)
|
||||
//监听屏幕旋转
|
||||
// resize和orientationchange的不同:
|
||||
// resize: 监听尺寸变化,orientationchange:监听移动端横竖屏切换
|
||||
// orientationchange:宽高为切换前宽高,需延时才能获取切换后的宽高
|
||||
$(window).on("orientationchange", function() {
|
||||
if(index_dk_single)
|
||||
parent.layer.full(index_dk_single)
|
||||
setTimeout(function() {
|
||||
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height() - 60)
|
||||
}, 100)
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,272 @@
|
||||
<!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">
|
||||
<style>
|
||||
.pcki-page {overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch;}
|
||||
#content {padding: 0 10px;}
|
||||
#content #info .info-row {display: inline-block; width: 50%; margin-top: 5px;}
|
||||
#content #info .info-row span {display: inline-block; width: 50%;}
|
||||
#content #info .text{font-weight: bold; text-align: left;}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- 引入 -->
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css?v=1">
|
||||
<!-- ckinput -->
|
||||
<script src="js/pct_tools/jquery.min.js"></script>
|
||||
<script src="js/pct_tools/pct_tools.js"></script>
|
||||
<link rel="stylesheet" href="js/pct_tools/pct_tools.css">
|
||||
<!-- viewer js -->
|
||||
<script src="js/viewer/viewer.min.js"></script>
|
||||
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="pcki-page">
|
||||
<!-- 顶部标题栏 -->
|
||||
<div class="state_bar">
|
||||
<div class="text_title">陈列详情</div>
|
||||
<div class="btn_close" onclick="u_close_this_div();"><img src="images/close.png" width=30 height=30 border=0></div>
|
||||
</div>
|
||||
<!--头部 上下款 搜索-->
|
||||
<div class="header">
|
||||
<a id="btn-prev" class="-btn-into" style="position: absolute; top: 0; left: 20px;"><i class="layui-icon layui-icon-left"></i>上一杆</a>
|
||||
<div id="s-title" class="layui-input-inline" style="width: 20%; margin-right: 10px; max-width: 150px; min-width: 100px;"><input type="text" name="" placeholder="款号或圆牌号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<a id="btn-search" class="layui-btn layui-input-inline" style="border-radius:10px 10px 10px 10px; background-color: #F04122; padding: 0 10px;">查询</a>
|
||||
<a id="btn-next" class="-btn-into" style="position: absolute; top: 0; right: 20px;">下一杆<i class="layui-icon layui-icon-right"></i></a>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 信息层 -->
|
||||
<div id="content" class="layui-row">
|
||||
<div class="layui-col-lg8 layui-col-md8 layui-col-sm8 layui-col-xs12" style="margin-top: 10px; margin-bottom: 10px;">
|
||||
<div id="pic" style="width: 400px; height: 300px; line-height: 300px; box-shadow: 1px 1px 10px 3px #d0d0d0;"><img src="" watermark></div>
|
||||
</div>
|
||||
<div id="info" class="layui-col-lg4 layui-col-md4 layui-col-sm4 layui-col-xs12" style="margin-top: 10px; margin-bottom: 10px; text-align: left;">
|
||||
<div id="title" style="margin-bottom: 10px; font-size: 16px; text-align: center;"></div>
|
||||
<div id="cljs" style="min-height: 150px;"></div>
|
||||
<hr class="layui-bg-gray">
|
||||
<div id="zk" class="info-row"><span>总款数</span><span class="text"></span></div><div id="zydk" class="info-row"><span>已订</span><span class="text"></span></div>
|
||||
<div id="bzk" class="info-row"><span>本组款数</span><span class="text"></span></div>
|
||||
<div id="bzydk" class="info-row"><span>已订款数</span><span class="text"></span></div>
|
||||
<div id="bzydj" class="info-row"><span>已订件数</span><span class="text"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 陈列 -->
|
||||
<div id="cls" class="layui-row"></div>
|
||||
<hr class="layui-bg-gray">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var cl_data
|
||||
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','rate'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form
|
||||
,rate = layui.rate
|
||||
|
||||
var url="./?_m=cl&_a=single&zsh="+get_url_param("zsh");
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
cl_data = json_data
|
||||
//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;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else if(json_data.code==2){
|
||||
//------------------重新登录
|
||||
url1="login.htm?error_msg="+json_data.msg;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else{
|
||||
//------------------填充内容
|
||||
console.log(["初始", json_data])
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
|
||||
//------------上一杆
|
||||
if (json_data.prev != "") {
|
||||
$("#btn-prev").attr("href", "cl_single.htm?zsh="+json_data.prev)
|
||||
} else {
|
||||
$("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一杆了。')")
|
||||
}
|
||||
//------------下一杆
|
||||
if (json_data.next != "") {
|
||||
$("#btn-next").attr("href", "cl_single.htm?zsh="+json_data.next)
|
||||
} else {
|
||||
$("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一杆了。')")
|
||||
}
|
||||
//------------展示图片
|
||||
$("#content #pic").css("max-width", Math.min($("#content").width(), 400))
|
||||
$("#content #pic img").attr({"src": json_data.pic_big, "data-original": json_data.pic_big}).css({"width": json_data.pic_big_w+"px", "height": json_data.pic_big_h+"px", "max-width": Math.min($("#content").width(), 400)+"px", "max-height": "300px"})
|
||||
//------------查看大图
|
||||
new Viewer(document.getElementById("pic"), {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
//------------信息
|
||||
$("#content #info #title").html(json_data.title)
|
||||
$("#content #info #cljs").html(json_data.cljs)
|
||||
$("#content #info #zk .text").text(json_data.zk+"款")
|
||||
$("#content #info #zydk .text").text(json_data.zydk+"款")
|
||||
$("#content #info #bzk .text").text(json_data.bzk+"款")
|
||||
$("#content #info #bzydk .text").text(json_data.bzydk+"款")
|
||||
$("#content #info #bzydj .text").text(json_data.bzydj+"件")
|
||||
//------------相关陈列
|
||||
for (var i = 0; i < json_data.cls.length; i++) {
|
||||
var cl = json_data.cls[i]
|
||||
var cls = "<div class='layui-col-lg2 layui-col-md2 layui-col-sm3 layui-col-xs4' style='padding:5px; height: 173px;'><a href='javascript:openDkSingle("+cl.id+")'>" // box
|
||||
cls += "<div style='width: 100px;height: 100px; line-height: 100px; padding-left: 20px; padding-right: 20px; position: relative;'><img src="+cl.pic+" style='max-width: 100px; max-height: 100px;' watermark>" // pic
|
||||
cls += cl.ydj == 0 ? "" : "<div style='position: absolute; top: 0; left: 0; border: solid 1px black; width: 45px; height: 20px; line-height: 20px; font-size: 12px; background-color: #9b9b9b;'>"+cl.ydj+"</div>" // ydj
|
||||
if (json_data.bs_kh_dj == "word" && cl.kh_dj) {
|
||||
cls += "<span style='position: absolute; top: 0; right: 0; width: 18px; word-wrap: break-word; background-color: #F06054; color: white; padding: 4px 2px; border-radius: 4px; z-index: 9; line-height: 20px;'>"+cl.kh_dj+"</span>"
|
||||
} else if (json_data.bs_kh_dj == "pic" && cl.kh_dj) {
|
||||
cls += "<img src='../attachments/"+cl.kh_dj+".png' style='position: absolute; top: 0; right: 0;' watermark>"
|
||||
}
|
||||
// cls += "<div style='position: absolute; top: 0; left: 0; border: solid 1px black; width: 45px; height: 20px; line-height: 20px; font-size: 12px; background-color: #9b9b9b;'>100件</div>" // ydj
|
||||
cls += "</div>"
|
||||
cls += "<div style='width: 140px; background-color: #f5f5f5; margin-top: 3px; text-align: left;'>"
|
||||
cls += "<div class='layui-inline' style=' text-align: center; width: 30px; height: 30px; line-height: 30px; border-radius: 15px; background-color: #d0d0d0; color: white; font-size: 12px; margin-left: 10px; margin-right: 20px;'>"+cl.yph+"</div>" // yph
|
||||
cls += "<div class='layui-inline'><div>"+cl.kh+"</div><div style='width: 80px;'>"+cl.color+"-"+cl.color_title+"</div></div>" // kh, color
|
||||
cls += "</div>"
|
||||
cls += "</a></div>"
|
||||
$("#cls").append(cls)
|
||||
}
|
||||
|
||||
// 添加水印
|
||||
USetWatermark({
|
||||
is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
})
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function() { layui.layer.msg("与服务器通信失败!") }
|
||||
}
|
||||
);
|
||||
|
||||
// 搜索,款号,圆牌号
|
||||
$("#btn-search").click(function() {
|
||||
if (!$("#s-title input").val().replace(/ /g, "")) return true
|
||||
var url="./?_m=cl&_a=single&s_title="+$("#s-title input").val()
|
||||
console.log(url)
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(res_jsondata)
|
||||
if (res_jsondata.code == 100) {
|
||||
location.href = "dk_single"+(cl_data.face == "2" ? "_qj" : "")+".htm?khid="+res_jsondata.khid
|
||||
} else if (res_jsondata.code == 101) {
|
||||
var content_html = "<div style='padding: 15px;'>找到以下符合条件的多项,请选择:</div>"
|
||||
for (var i = 0; i < res_jsondata.msg.length; i++) {
|
||||
var msgl = res_jsondata.msg[i]
|
||||
content_html += '<a href="dk_single'+(cl_data.face == "2" ? "_qj" : "")+'.htm?khid='+msgl.khid+'" style="display: block; float: left; width: 60px; padding: 10px; color: blue; text-decoration: underline;">'+msgl.title+'</a>'
|
||||
}
|
||||
layer.open({
|
||||
type: 1
|
||||
,title: false //不显示标题栏
|
||||
,closeBtn: true
|
||||
,area: '300px;'
|
||||
,shade: 0.8
|
||||
,id: 'dk-location' //设定一个id,防止重复弹出
|
||||
// ,btn: ['火速围观', '残忍拒绝']
|
||||
,btnAlign: 'c'
|
||||
,moveType: 1 //拖拽模式,0或者1
|
||||
,content: content_html
|
||||
})
|
||||
} else {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function() { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
|
||||
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
// 将iframe的高度同步为其父元素.layui-layer-iframe的高度
|
||||
$(this).find("[name="+window_name+"]").height($(this).height())
|
||||
})
|
||||
})
|
||||
|
||||
function openDkSingle(khid) {
|
||||
layui.use('layer', function(){
|
||||
// var layer = parent.parent.layer;
|
||||
var layer = parent.layer
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: "dk_single"+(cl_data.face == "2" ? "_qj" : "")+".htm?khid="+khid,
|
||||
offset: 'b',
|
||||
closeBtn: 0,
|
||||
anim: 2
|
||||
});
|
||||
layer.full(index);
|
||||
})
|
||||
}
|
||||
|
||||
function update_yd() {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
$.ajax({
|
||||
url: "./?_m=dk&_a=get_wcl"
|
||||
,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);
|
||||
location.reload()
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function() { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,324 @@
|
||||
<!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">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<style>
|
||||
.yph{
|
||||
width:40px;
|
||||
height:40px;
|
||||
line-height:40px;
|
||||
background:#666;
|
||||
text-align:center;
|
||||
border-radius:25px;
|
||||
-moz-border-radius:25px;
|
||||
-webkit-border-radius:25px;
|
||||
color:#ffffff;
|
||||
font-weight:bold;
|
||||
}
|
||||
.layui-form-switch {
|
||||
margin-top: 0px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="width:99%;background-color:#fff;">
|
||||
<div class="layui-fluid" style="padding:0;">
|
||||
<div class="layui-row layui-col-space10" id="edt_msg_content">
|
||||
<div style="width:100%;height:50px;line-height:50px;background-color:#fff;min-width:600px;">
|
||||
<div style="float:left;width:15%;text-align:left;" id="tb110"></div>
|
||||
<div style="float:left;width:70%;min-width:400px;">
|
||||
<form class="layui-form">
|
||||
<div id="change_this" class="layui-input-inline"></div>
|
||||
<div id="change_this2" class="layui-input-inline">
|
||||
<input type="checkbox" id="check_tb" name="check_tb" lay-skin="switch" lay-filter="check_tb" lay-text="跟随|关闭" checked="checked">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div style="float:left;width:15%;text-align:right;" id="tb111"></div>
|
||||
</div>
|
||||
<div style="width:100%;height:2px;padding:0px;background-color:#eee;"></div>
|
||||
<div style="width:100%;min-width:650px;background-color:#fff;height:215px;margin:0 auto;text-align:center;" id="pic_list">
|
||||
|
||||
</div>
|
||||
<div style="width:100%;height:2px;padding:0px;background-color:#eee;"></div>
|
||||
<div style="width:100%;background-color:#fff;min-height:230px;" id="pic_list2">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var is_mobile="n";
|
||||
var id_auto_tb;
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index','form','user','rate','element'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
|
||||
var url="./?_m=cls";
|
||||
_ajax(url);
|
||||
|
||||
id_auto_tb=setInterval(function(){
|
||||
_ajax(url);
|
||||
},"5000");
|
||||
function _ajax(url1){
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code=="100"){
|
||||
|
||||
var html1="";
|
||||
//
|
||||
if(res.select_tid_ct>0){
|
||||
html1+='<div class="layui-input-inline">展厅</div>';
|
||||
html1+='<div class="layui-input-inline" style="width:100px;text-align:left;"><select name="s_tid" lay-filter="s_tid">';
|
||||
var op=res.select_tid.op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==res.select_tid.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div>';
|
||||
html1+='<div class="layui-input-inline"> </div>';
|
||||
|
||||
form.on('select(s_tid)', function(data){
|
||||
_ajax("./?_m=cls&s_tid="+data.value);
|
||||
un_d_auto_tb();
|
||||
});
|
||||
}
|
||||
//
|
||||
html1+='<div class="layui-input-inline">第</div>';
|
||||
html1+='<div class="layui-input-inline" style="width:100px;text-align:left;"><select name="s_zsh" lay-filter="s_zsh">';
|
||||
var op=res.select_zsh.op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==res.select_zsh.value)
|
||||
html1+='selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div>';
|
||||
html1+='<div class="layui-input-inline">组 </div>';
|
||||
|
||||
form.on('select(s_zsh)', function(data){
|
||||
_ajax("./?_m=cls&s_tid="+res.this_tid+"&s_zsh="+data.value);
|
||||
un_d_auto_tb();
|
||||
});
|
||||
$("#change_this").html(html1);
|
||||
form.on('switch(check_tb)', function(obj){
|
||||
if(obj.elem.checked==true){
|
||||
url_tb="./?_m=cls&s_tid="+res.this_tid+"&s_zsh=";
|
||||
id_auto_tb=setInterval(function(){
|
||||
_ajax(url_tb);
|
||||
},"5000");
|
||||
}else{
|
||||
un_d_auto_tb();
|
||||
}
|
||||
});
|
||||
|
||||
var html1=""
|
||||
html1+='<a id="tb_pre1" href="javascript:void(0);" data-tid="'+res.this_tid+'" data-zsh="'+res.this_zsh+'"> <i class="layui-icon layui-icon-left"></i><strong>上一组</strong></a>';
|
||||
$("#tb110").html(html1);
|
||||
var html1=""
|
||||
html1+='<a id="tb_next1" href="javascript:void(0);" data-tid="'+res.this_tid+'" data-zsh="'+res.this_zsh+'"><strong>下一组</strong><i class="layui-icon layui-icon-right"></i> </a>';
|
||||
$("#tb111").html(html1);
|
||||
//
|
||||
var html1="";
|
||||
if(res.code_enable=="y"){
|
||||
html1+='<div style="width:670px;">';
|
||||
|
||||
for(var i=0;i<5;i++){
|
||||
if(i<res.zshcount){
|
||||
html1+='<div style="float:left;margin-left:2px;">';
|
||||
if(res.all_zsh[i].zsh==res.this_zsh){
|
||||
html1+='<table cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee" style="border:1px solid red;">';
|
||||
}else{
|
||||
html1+='<table cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee" style="border:1px solid #eeeeee;">';
|
||||
}
|
||||
|
||||
html1+='<tr><td bgcolor="#ffffff" height="130px" width="130px" class="picbtn" data-tid="'+res.this_tid+'" data-zsh="'+res.all_zsh[i].zsh+'">';
|
||||
html1+='<div style="position:relative;width:100%;height:100%;">';
|
||||
html1+='<div style="border: 1px solid #eee; position:absolute;left:0;top:0;">'+res.all_zsh[i].zsh+'</div>';
|
||||
html1+='<div style="height:130px;line-height:130px;"><img src="'+res.all_zsh[i].picsrc+'" width="'+res.all_zsh[i].pic_w+'" height="'+res.all_zsh[i].pic_h+'" /></div>';
|
||||
html1+='</div>';
|
||||
html1+='</td></tr>';
|
||||
html1+='<tr><td><div style="height:80px;width:130px;text-align:left;overflow: auto;">';
|
||||
var kh_detail=res.all_zsh[i].kh_detail.split("|");
|
||||
for(var j=0;j<kh_detail.length;j++){
|
||||
html1+='<span style="font-size:8px;height:20px;line-height:20px;">'+kh_detail[j]+'</span><br>';
|
||||
}
|
||||
html1+='</div></td></tr>';
|
||||
html1+='</table></div>';
|
||||
}else{
|
||||
html1+='<div style="float:left;margin-left:2px;">';
|
||||
html1+='<table cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee" style="border:1px solid #eeeeee;">';
|
||||
html1+='<tr><td bgcolor="#ffffff" height="210px" width="130px">无数据</td></tr>';
|
||||
html1+='</table></div>';
|
||||
}
|
||||
}
|
||||
html1+='</div>';
|
||||
|
||||
}else{
|
||||
html1='<div style="width:670px;">'+res.err_msg+'<div>';
|
||||
}
|
||||
$("#pic_list").html(html1);
|
||||
|
||||
var html1="";
|
||||
if(res.code_enable=="y"){
|
||||
for(var i=0;i<res.all_kh.length;i++){
|
||||
html1+='<div style="float:left;margin-left:2px;">';
|
||||
html1+='<table cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee" style="border:1px solid #eeeeee;">';
|
||||
html1+='<tr><td colspan=2 bgcolor="#ffffff" height="150px" width="150px"><img src="'+res.all_kh[i].picsrc+'" width="'+res.all_kh[i].pic_w+'" height="'+res.all_kh[i].pic_h+'" /></td></tr>';
|
||||
html1+='<tr><td height="50px"><div class="yph">'+res.all_kh[i].xh+'</div></td><td align=left><p style="color:'+res.all_kh[i].fontcolor+'">'+res.all_kh[i].kh+'</p>';
|
||||
if(res.all_kh[i].color){
|
||||
html1+='<p style="color:'+res.all_kh[i].fontcolor+'">'+res.all_kh[i].color+'</p>';
|
||||
}
|
||||
html1+='</td></tr>';
|
||||
html1+='<tr><td height="30px" colspan=2 align=left>订单: <span>'+res.all_kh[i].js+'件/'+res.all_kh[i].jsrs+'人</span></td></tr>';
|
||||
html1+='<tr><td height="30px" colspan=2 align=left>评价: <span>'+res.all_kh[i].ppf+'分/'+res.all_kh[i].ppfrs+'人</span></td></tr>';
|
||||
html1+='</table>';
|
||||
html1+='</div>';
|
||||
}
|
||||
}
|
||||
$("#pic_list2").html(html1);
|
||||
|
||||
$(".picbtn").click(function(){
|
||||
var s_tid=$(this).attr('data-tid');
|
||||
var s_zsh=$(this).attr('data-zsh');
|
||||
_ajax("./?_m=cls&s_tid="+s_tid+"&s_zsh="+s_zsh);
|
||||
un_d_auto_tb();
|
||||
});
|
||||
$("#tb_pre1").click(function(){
|
||||
var s_tid=$(this).attr('data-tid');
|
||||
var s_zsh=$(this).attr('data-zsh');
|
||||
tb_pre(s_tid,s_zsh);
|
||||
});
|
||||
$("#tb_next1").click(function(){
|
||||
var s_tid=$(this).attr('data-tid');
|
||||
var s_zsh=$(this).attr('data-zsh');
|
||||
tb_next(s_tid,s_zsh);
|
||||
});
|
||||
|
||||
form.render();
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//上一组
|
||||
function tb_pre(tid,zsh){
|
||||
un_d_auto_tb();
|
||||
var url="./?_m=cls&_a=tb_pre&tid="+tid+"&s_zsh="+zsh;
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code=="100"){
|
||||
_ajax("./?_m=cls&s_tid="+res.tid+"&s_zsh="+res.zsh)
|
||||
}else{
|
||||
layui.layer.alert("数据准备中,请稍后......");
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//下一组
|
||||
function tb_next(tid,zsh){
|
||||
|
||||
var url="./?_m=cls&_a=tb_next&tid="+tid+"&s_zsh="+zsh;
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code=="100"){
|
||||
_ajax("./?_m=cls&s_tid="+res.tid+"&s_zsh="+res.zsh);
|
||||
un_d_auto_tb();
|
||||
}else{
|
||||
layui.layer.alert("数据准备中,请稍后......");
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//取消自动跟随
|
||||
function un_d_auto_tb(){
|
||||
if(id_auto_tb)
|
||||
clearInterval(id_auto_tb);
|
||||
$("#check_tb").removeAttr('checked');
|
||||
form.render("checkbox");
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
//---------------------------------------------------------------------全局参数
|
||||
$tmpl_m1_pic_width=188;
|
||||
$tmpl_m1_pic_height=250;
|
||||
//同步界面开启
|
||||
$sys_enable_tb="y";
|
||||
$tmpl_is_multi_ms="y";
|
||||
//
|
||||
$sys_title="E订通";
|
||||
$sys_meta="width=device-width,height=device-height,user-scalable=yes,initial-scale=1,maximum-scale=3.0,minimum-scale=1";
|
||||
$arr_yn=array("y"=>"是","n"=>"否");
|
||||
$arr_client_face=array("1"=>"总经理","2"=>"区域经理","3"=>"代理商","4"=>"店铺","5"=>"陈列师","6"=>"设计师","7"=>"主讲","8"=>"管理员","9"=>"区域");
|
||||
$arr_log_hd_action=array("11"=>"登录","12"=>"注销","13"=>"下线","21"=>"下单","22"=>"减量","23"=>"加量","24"=>"删单","61"=>"评款","62"=>"删除评款");
|
||||
$arr_log_hd_action_in=array("11","12","13","21","22","23","24","61","62");
|
||||
//---------------------------------------------------------------------全局常量,一般不需要修改
|
||||
$flag_pad_offline="";
|
||||
define("THIS_COOKIE","edt_".date("Ymd")."_cookie");
|
||||
define("LOGIN_COOKIE","edt_".date("Ymd")."_login_cookie");
|
||||
define("THIS_FILE_ROOT",dirname(__FILE__));
|
||||
define("THIS_IN","edt_ipad");
|
||||
?>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
header("Content-type: text/html;charset=utf-8");//输出utf8编码内容
|
||||
echo "is_mobile_config=0";//设置截屏拍照限制:0为警告模式,允许截图拍照,但截图拍照后会锁定账号和应用;1为禁止模式,必须安装描述文件后才允许使用,未安装会自动安装ipad目录下的edt.mobileconfig;2为关闭模式,不限制截图拍照,也不会有警告,该模式需要应用升级到5.3.7或以后版本,低于此版本应用会识别为警告模式
|
||||
echo "\n";//回车符号
|
||||
echo "low_version=3.0";//设置最低版本:低于此版本的应用会无法使用并提示升级
|
||||
echo "\n";//回车符号
|
||||
echo "date_end=";//本场订货会时间:会显示到设置项中,可自行定义或留空,暂时没有涉及到功能
|
||||
echo "\n";//回车符号
|
||||
echo "title=";//本场订货会标题:会显示到设置项中,可自行定义或留空,暂时没有涉及到功能
|
||||
echo "\n";//回车符号
|
||||
echo "is_webKit_disable=0";//是否禁用webkit:0为不禁用,由客户端自由控制是否开启;1为强制禁用
|
||||
echo "\n";
|
||||
?>
|
||||
@@ -0,0 +1,71 @@
|
||||
/* dk */
|
||||
|
||||
/* dk_single */
|
||||
/* 监听body点击冒泡,iOS没有该属性无法监听 */
|
||||
.htm-dk-single body { cursor:pointer }
|
||||
|
||||
.htm-dk-single .content .main-img-area .-box {
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
line-height: 400px;
|
||||
box-shadow: rgb(208, 208, 208) 1px 1px 10px 3px;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-show>video {
|
||||
max-width: 280px; max-height: 340px; margin-top: 10px;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-show>img {
|
||||
max-width: 300px; max-height: 400px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-choose {
|
||||
position: absolute; line-height: 40px; left: 0; bottom: 0; text-align: left;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-choose .-item {
|
||||
width: 30px; height: 40px; line-height: 40px; margin: 1px; display: inline-block; text-align: center; vertical-align: middle;
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-choose .-item:not(.active) {
|
||||
border: solid 1px #9b9b9b; cursor: pointer;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-choose .-item.active {
|
||||
border: solid 1px #F04122;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area .-box .-choose .-item>img {
|
||||
max-width: 30px;
|
||||
max-height: 40px;
|
||||
}
|
||||
.htm-dk-single .content .main-img-area span.-khdj { position: absolute; top: 8px; right: 8px; width: 18px; word-wrap: break-word; background-color: #F06054; color: white; padding: 4px 2px; border-radius: 4px; z-index: 9; line-height: 20px; }
|
||||
.htm-dk-single .content .main-img-area img.-khdj { position: absolute; top: 8px; right: 8px; }
|
||||
.htm-dk-single .content .info-area .-title { color: #9b9b9b; text-align: right; }
|
||||
.htm-dk-single .content .info-area .-text { font-weight: bold; text-align: left; }
|
||||
.htm-dk-single .content .info-area [info-title=gz]>div>div { color:#00A1F8; font-weight: bold; }
|
||||
.htm-dk-single .content .info-area [info-title=gz]>div>div i { display: inline-block; vertical-align: middle; margin-right: 5px; }
|
||||
.htm-dk-single .content .info-area [info-title=gz]>div>div text { display: inline-block; vertical-align: middle; }
|
||||
.htm-dk-single .content .info-area [info-title=xj]>span { display: inline-block; vertical-align: middle; }
|
||||
.htm-dk-single .content .info-area [info-title=xj] .-item { color: #9b9b9b; }
|
||||
.htm-dk-single .content .info-area [info-title=pjwz] { margin: 10px 0; }
|
||||
.htm-dk-single .content .info-area [info-title=ds] table { width: 100%; border: solid 1px #eee; }
|
||||
.htm-dk-single .content .info-area [info-title=dhl] table { width: 100%; border-width: 1px; border-color: #eee; line-height: 28px; }
|
||||
.htm-dk-single .content .info-area [info-title=dhl] table td.-col-a { padding: 4px 0; height: 28px; width: 20%; }
|
||||
.htm-dk-single .content .info-area [info-title=dhl] table td.-col-b { width: 40%; }
|
||||
|
||||
.htm-dk-single #dds td { padding: 1px; }
|
||||
.htm-dk-single #dds .dd-row input { max-width: 80px; margin: auto; }
|
||||
.htm-dk-single #dds .layui-input, #bhs .layui-input, #pm-global-option .layui-input { padding-left: 0px;}
|
||||
.htm-dk-single .div_input_remark {margin-bottom: 10px;}
|
||||
.htm-dk-single .div_save_remark {width:80px; padding:4px; display: inline-block;}
|
||||
.htm-dk-single .div_button_del_pj {padding: 4px; display: inline-block;}
|
||||
.htm-dk-single #layui-layer-dpm-show .layui-form-radio {margin: 0;}
|
||||
.htm-dk-single #layui-layer-dpm-show .layui-layer-btn {display: none;}
|
||||
|
||||
.htm-dk-single .xg-area {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* dk_single_pad */
|
||||
|
||||
/* dk_single_phone */
|
||||
@@ -0,0 +1,75 @@
|
||||
/* 共用 */
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
.pcki-page { overflow-x: hidden; -webkit-overflow-scrolling: touch; }
|
||||
.pcki-page>div {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
/* 顶部标题栏 */
|
||||
.g-top-title-bar {
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #eee;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.g-top-title-bar .-title {
|
||||
width: 100px;
|
||||
float: left;
|
||||
font-size: 16px;
|
||||
}
|
||||
.g-top-title-bar .-btn-close {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 顶部操作栏 */
|
||||
.g-top-manipulable-bar {
|
||||
text-align: center;
|
||||
background-color: #ffffff;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
position: relative;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.g-top-manipulable-bar .-btn-to {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
}
|
||||
.g-top-manipulable-bar .-btn-to:first-child {
|
||||
left: 20px;
|
||||
}
|
||||
.g-top-manipulable-bar .-btn-to:last-child {
|
||||
right: 20px;
|
||||
}
|
||||
.g-top-manipulable-bar .-input-search {
|
||||
width: 20%; margin-right: 10px; max-width: 150px; min-width: 100px;
|
||||
}
|
||||
.g-top-manipulable-bar .-input-search input {
|
||||
border-radius:10px 10px 10px 10px;
|
||||
}
|
||||
.g-top-manipulable-bar .-btn-query {
|
||||
border-radius:10px 10px 10px 10px; background-color: #F04122; padding: 0 10px;
|
||||
}
|
||||
|
||||
/* 自定义viewer */
|
||||
.viewer-container {background-color: white !important;}
|
||||
/* 自定义layui */
|
||||
@media screen and (max-width: 448px) {
|
||||
.layui-col-xxs12 { width: 100%; }
|
||||
.layui-col-xxs12 { position: relative; display: block; box-sizing: border-box; }
|
||||
.layui-col-xxs12 { float: left; }
|
||||
}
|
||||
|
||||
/* 通用 */
|
||||
.g-position-relative { position: relative; }
|
||||
.g-hidden { display: none; }
|
||||
.g-theme-a-a { background-color: #F04122; }
|
||||
.g-theme-a-b { border-color: #F04122; color: #F04122; }
|
||||
@@ -0,0 +1,392 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search_con_more td{padding:0px;margin:0px;color:#000;}
|
||||
#offon{width:300px;}
|
||||
#form1_submit{display:none;}
|
||||
/* #form1_search_left{float:left;padding-left:15px;} */
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- universal -->
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
<script src="js/universal/universal.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!--搜索-->
|
||||
<div class="search">
|
||||
<form class="layui-form" id="form1_search" action="detail.htm">
|
||||
<div id="form1_search_left">
|
||||
<div id="search_xx" style="line-height:45px;" class="layui-row"></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"></div>
|
||||
<script>
|
||||
var index_dk_single="";
|
||||
//更新已订数据
|
||||
|
||||
function update_yd(khid){
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
|
||||
//获取预设数据
|
||||
var url="./?_m=detail&khid="+khid;
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
var res=$.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 obj1=$(document).find("."+khid+"");
|
||||
if(json_data.get_new.length>0 && json_data.get_newcolor.length>0){
|
||||
var html1="";var color;var bgcolor;var html2="";
|
||||
//合计
|
||||
for(var i=0;i<res.table_hj.length;i++){
|
||||
if(res.table_hj[i].indexOf("co")!="-1"){
|
||||
hj=res.table_hj[i].split("co");
|
||||
html2+='<td colspan="'+hj[0]+'">'+hj[1]+'</td>';
|
||||
}else{
|
||||
html2+='<td>'+res.table_hj[i]+'</td>';
|
||||
}
|
||||
|
||||
}
|
||||
html2+='</tr>';
|
||||
$("#hj").html(html2);
|
||||
//
|
||||
for(var i=0;i<res.get_new.length;i++){
|
||||
color=res.get_newcolor[i];
|
||||
if(color=="td1") bgcolor="#f5f5f5"; else bgcolor="white";
|
||||
if(obj1){
|
||||
html1+="<tr style='background:"+bgcolor+";' class='"+khid+"'>";
|
||||
for(var j=0;j<res.get_new[i].length;j++)
|
||||
{
|
||||
fg=res.get_new[i][j].split("|");
|
||||
//-------
|
||||
if(fg[0].indexOf("rs")!="-1"){
|
||||
fgh=fg[0].split(":");
|
||||
if(fg[1].indexOf("tzyl")!="-1" || fg[1].indexOf("yulan")!="-1"){
|
||||
if(fg[1].indexOf("tzyl")!="-1"){
|
||||
tzyl=fg[1].split("tzyl");
|
||||
var picxx=tzyl[0].split("——");
|
||||
if(res.face=="4"){
|
||||
html1+='<td rowspan="'+fgh[1]+'"><a onclick="dk_single('+khid+');"><img src="'+picxx[0]+'" height="'+picxx[1]+'" watermark /><br>'+tzyl[1]+'</a></td>';
|
||||
}else{
|
||||
html1+='<td rowspan="'+fgh[1]+'"><img src="'+picxx[0]+'" height="'+picxx[1]+'" watermark /><br>'+tzyl[1]+'</td>';
|
||||
}
|
||||
}
|
||||
//if(fg[1].indexOf("yulan")!="-1"){
|
||||
//yulan=fg[1].split("yulan");
|
||||
//html1+="<td rowspan="+fgh[1]+"><a href='javascript:void(0));' onmouseover='show_kh_pic(\""+yulan[1]+"\",\""+yulan[0]+"\")'>"+yulan[1]+"</td>";
|
||||
//}
|
||||
}
|
||||
else
|
||||
html1+='<td rowspan="'+fgh[1]+'">'+fg[1]+'</td>';
|
||||
}else{
|
||||
html1+='<td style="">'+fg[1]+'</td>';
|
||||
}
|
||||
}
|
||||
html1+="</tr>";
|
||||
}
|
||||
}
|
||||
$("."+khid+"").eq(0).after(html1);
|
||||
obj1.remove();
|
||||
}else{
|
||||
obj1.remove();
|
||||
//合计
|
||||
for(var i=0;i<res.table_hj.length;i++){
|
||||
if(res.table_hj[i].indexOf("co")!="-1"){
|
||||
hj=res.table_hj[i].split("co");
|
||||
html2+='<td colspan="'+hj[0]+'">'+hj[1]+'</td>';
|
||||
}else{
|
||||
html2+='<td>'+res.table_hj[i]+'</td>';
|
||||
}
|
||||
|
||||
}
|
||||
html2+='</tr>';
|
||||
$("#hj").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";
|
||||
}
|
||||
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'], function(){
|
||||
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var url="./?_m=detail"+query_str;
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
var res=$.parseJSON(res);
|
||||
//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{
|
||||
//自定义选项
|
||||
var html2="";
|
||||
for(var i=0;i<res.select_qm.length;i++){
|
||||
html2 += '<div class="layui-col-lg2 layui-col-md2 layui-col-sm2 layui-col-xs4" style="text-align: center;">'
|
||||
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>'
|
||||
// html2+='</select></div><div class="layui-input-inline" style="width:10px"></div>';
|
||||
}
|
||||
if(res.show_key=="y"){
|
||||
html2+='<div class="layui-input-inline" style="width:100px;"><select name="s_key" lay-filter="s_is_jd">';
|
||||
var op=res.select_order_flag.op;
|
||||
for(var i=0;i<op.length;i++){
|
||||
html2+='<option value="'+op[i].no+'"';
|
||||
if(op[i].no==res.select_order_flag.value)
|
||||
html2+='selected';
|
||||
html2+='>'+op[i].title+'</option>';
|
||||
}
|
||||
html2+='</select></div>';
|
||||
}
|
||||
$("#search_xx").html(html2);
|
||||
form.render();
|
||||
form.on('select(s_is_jd)', function(data){
|
||||
$("#form1_submit").click();
|
||||
})
|
||||
//1
|
||||
var html1="";
|
||||
html1+='<table class="layui-table">';
|
||||
html1 += '<thead>'
|
||||
if(res.detail_size_ms=="2"){
|
||||
for(var i=0;i<res.thead_str_group;i++){
|
||||
if(i==0){
|
||||
html1+='<tr style="background:#f5f5f5;">';
|
||||
for(var j=0;j<res.thead_str[i].length;j++){
|
||||
if(res.thead_str[i][j].is_size_cs=='y'){
|
||||
html1+='<th colspan="'+res.thead_str_cs+'">'+res.thead_str[i][j].title+'</th>';
|
||||
}else{
|
||||
html1+='<th>'+res.thead_str[i][j].title+'</th>';
|
||||
}
|
||||
}
|
||||
html1+='</tr>';
|
||||
}else{
|
||||
html1+='<tr style="background:#f5f5f5;">';
|
||||
for(var j=0;j<res.thead_str[i].length;j++){
|
||||
html1+='<th>'+res.thead_str[i][j].title+'</th>';
|
||||
}
|
||||
html1+='</tr>';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(var i=0;i<res.thead_str_group;i++){
|
||||
if(i==0){
|
||||
html1+='<tr style="background:#f5f5f5;">';
|
||||
for(var j=0;j<res.thead_str[i].length;j++){
|
||||
if(res.thead_str[i][j].is_size!='y'){
|
||||
html1+='<th rowspan="'+res.thead_str_group+'">'+res.thead_str[i][j].title+'</th>';
|
||||
}else{
|
||||
html1+='<th>'+res.thead_str[i][j].title+'</th>';
|
||||
}
|
||||
}
|
||||
html1+='</tr>';
|
||||
}else{
|
||||
html1+='<tr style="background:#f5f5f5;">';
|
||||
for(var j=0;j<res.thead_str[i].length;j++){
|
||||
html1+='<th>'+res.thead_str[i][j].title+'</th>';
|
||||
}
|
||||
html1+='</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
html1 += '</thead>'
|
||||
html1 += '<tbody>'
|
||||
var fg=[];var fgh=[]; var tzyl=[]; var hj=[];var yulan=[];var panduan=0;var yanse;var x;var fgyanse;var bgcolor;
|
||||
for(var i=0;i<res.table_mid.length;i++){
|
||||
fg=res.table_mid[i][0].split("|");
|
||||
if(res.table_color[i][0]=="td1") bgcolor="#f5f5f5"; else bgcolor="white";
|
||||
html1+='<tr style="background:'+bgcolor+'" class="'+res.table_id[i][0]+'">';
|
||||
for(var j=0;j<res.table_mid[i].length;j++)
|
||||
{
|
||||
fg=res.table_mid[i][j].split("|");
|
||||
//-------
|
||||
if(fg[0].indexOf("rs")!="-1"){
|
||||
fgh=fg[0].split(":");
|
||||
if(fg[1].indexOf("tzyl")!="-1" || fg[1].indexOf("yulan")!="-1"){
|
||||
if(fg[1].indexOf("tzyl")!="-1"){
|
||||
tzyl=fg[1].split("tzyl");
|
||||
var picxx=tzyl[0].split("——");
|
||||
if(res.face=="4"){
|
||||
html1+='<td rowspan="'+fgh[1]+'"><a onclick="dk_single('+res.table_id[i][0]+');"><img src="'+picxx[0]+'" height="'+picxx[1]+'" watermark /><br>'+tzyl[1]+'</a></td>';
|
||||
}else{
|
||||
html1+='<td rowspan="'+fgh[1]+'"><img src="'+picxx[0]+'" height="'+picxx[1]+'" watermark /><br>'+tzyl[1]+'</td>';
|
||||
}
|
||||
}
|
||||
//if(fg[1].indexOf("yulan")!="-1"){
|
||||
//yulan=fg[1].split("yulan");
|
||||
//html1+="<td rowspan="+fgh[1]+"><a href='javascript:void(0));' onmouseover='show_kh_pic(\""+yulan[1]+"\",\""+yulan[0]+"\")'>"+yulan[1]+"</td>";
|
||||
//}
|
||||
}else
|
||||
html1+='<td rowspan="'+fgh[1]+'">'+fg[1]+'</td>';
|
||||
}else{
|
||||
html1+='<td style="'+(yanse?'background:'+yanse+';':'')+'">'+fg[1]+'</td>';
|
||||
}
|
||||
}
|
||||
html1+='</tr>';
|
||||
}
|
||||
html1+='<tr style="background:#f5f5f5;" id="hj">';
|
||||
for(var i=0;i<res.table_hj.length;i++){
|
||||
if(res.table_hj[i].indexOf("co")!="-1"){
|
||||
hj=res.table_hj[i].split("co");
|
||||
html1+='<td colspan="'+hj[0]+'">'+hj[1]+'</td>';
|
||||
}else{
|
||||
html1+='<td>'+res.table_hj[i]+'</td>';
|
||||
}
|
||||
|
||||
}
|
||||
html1+='</tr>';
|
||||
html1 += '</tbody>'
|
||||
html1 += '</table>'
|
||||
$("#show-table").html(html1);
|
||||
USetWatermark({
|
||||
is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
})
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
$(window).on("orientationchange",function(e){
|
||||
// window.orientation
|
||||
// 0, 180: 竖屏,90, -90: 横屏
|
||||
if(index_dk_single) parent.layer.full(index_dk_single);
|
||||
})
|
||||
});
|
||||
//update_yd(2);
|
||||
</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);
|
||||
overflow: auto;
|
||||
position: relative;
|
||||
}
|
||||
#show-table table thead th {
|
||||
position: sticky;
|
||||
top: -1px;
|
||||
z-index: 1;
|
||||
background:#F5F5F5;
|
||||
}
|
||||
#show-table table tfoot td {
|
||||
/* position: sticky;
|
||||
bottom: -1px;
|
||||
z-index: 1; */
|
||||
background:#F5F5F5;
|
||||
}
|
||||
.layui-table {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,355 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search{width:100%;text-align:left;background-color:#fff;height:100px;line-height:;}
|
||||
.search_con_more td{padding:0px;margin:0px;color:#000;}
|
||||
#offon{width:300px;}
|
||||
#form1_submit{display:none;}
|
||||
#form1_search_left{float:left;background:;padding-left:15px;}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
</head>
|
||||
<body style="margin-top:10px;" onload="">
|
||||
<div class="layui-tab layui-tab-brief" lay-filter="tabgz" id="tabgz">
|
||||
</div>
|
||||
<script>
|
||||
var index_dk_single="";
|
||||
//更新已订数据
|
||||
function update_yd(khid){
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
//获取预设数据
|
||||
var gz=$(".layui-tab-title .layui-this").attr("lay-id");
|
||||
var url1="./?_m=dhgz&my_gz_type="+gz;
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
async:false,
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
var res=$.parseJSON(res);
|
||||
//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{
|
||||
console.log(res);
|
||||
arrgz=res.arr_gz;
|
||||
var html1="<ul class='layui-tab-title'>";
|
||||
var html2="<div class='layui-tab-content'>";
|
||||
for(var i=0;i<res.arr_gz.length;i++){
|
||||
html1+="<li";
|
||||
html2+="<div class='layui-tab-item";
|
||||
var html3="";
|
||||
if(res.arr_gz[i].k==res.gz){
|
||||
html1+=" class='layui-this'";
|
||||
html2+=" layui-show";
|
||||
|
||||
html3+="<table lay-filter='layui_table' cellspacing='0' cellpadding='0' border='0' class='layui-table'><tr style='background:#f5f5f5;'>";
|
||||
for(var j=0;j<res.head.length;j++){
|
||||
html3+='<td>'+res.head[j].v+'</td>';
|
||||
}
|
||||
html3+='</tr>';
|
||||
if(res.gz=="bdk"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td "+res.body[j].body[2].s+">"+res.body[j].body[2].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdks"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td>"+res.body[j].body[2].v+"</td><td "+res.body[j].body[3].s+">"+res.body[j].body[3].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdgg"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td>"+res.body[j].body[2].v+"</td><td>"+res.body[j].body[3].v+"</td><td "+res.body[j].body[4].s+">"+res.body[j].body[4].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bds"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_bc("+res.body[j].bc+");'>"+res.body[j].body[0].v+"</a></td><td><a onclick='dk_color("+res.body[j].color+");'>"+res.body[j].body[1].v+"</a></td><td>"+res.body[j].body[2].v+"</td><td "+res.body[j].body[3].s+">"+res.body[j].body[3].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="byxdk"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td></tr>";
|
||||
}
|
||||
}else if(res.gz=="jebl"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_kh_dj("+res.body[j].kh_dj+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td "+res.body[j].body[2].s+">"+res.body[j].body[2].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdkshi"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td>";
|
||||
for(var k=0;k<res.body[j].kh.length;k++){
|
||||
html3+="<a onclick='dk_single("+res.body[j].kh[k].khid+");'>"+res.body[j].kh[k].kh+"</a>, ";
|
||||
}
|
||||
html3+="</td><td>"+res.body[j].body[0].v+"</td><td "+res.body[j].body[1].s+">"+res.body[j].body[1].v+"</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
html1+=" lay-id='"+res.arr_gz[i].k+"'>"+res.arr_gz[i].v+"</li>";
|
||||
html2+="'>"+html3+"</div>";
|
||||
}
|
||||
html1+="</ul>"+html2;
|
||||
$("#tabgz").html(html1);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
//单款详情
|
||||
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 dk_bc(bc){
|
||||
var url="dk.htm?s_bc="+bc+"";
|
||||
parent.go_dk(url);
|
||||
}
|
||||
//颜色详情
|
||||
function dk_color(color){
|
||||
var url="dk.htm?s_color="+color+"";
|
||||
parent.go_dk(url);
|
||||
}
|
||||
//款式属性详情
|
||||
function dk_kh_dj(kh_dj){
|
||||
var url="dk.htm?s_kh_dj="+kh_dj+"";
|
||||
parent.go_dk(url);
|
||||
}
|
||||
|
||||
var is_mobile="n";
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','rate','element'], function(){
|
||||
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
var arrgz=new Array();
|
||||
var url="./?_m=dhgz";
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
async:false,
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
var res=$.parseJSON(res);
|
||||
//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{
|
||||
arrgz=res.arr_gz;
|
||||
var html1="<ul class='layui-tab-title'>";
|
||||
var html2="<div class='layui-tab-content'>";
|
||||
for(var i=0;i<res.arr_gz.length;i++){
|
||||
html1+="<li";
|
||||
html2+="<div class='layui-tab-item";
|
||||
var html3="";
|
||||
if(res.arr_gz[i].k==res.gz){
|
||||
html1+=" class='layui-this'";
|
||||
html2+=" layui-show";
|
||||
|
||||
html3+="<table lay-filter='layui_table' cellspacing='0' cellpadding='0' border='0' class='layui-table'><tr style='background:#f5f5f5;'>";
|
||||
for(var j=0;j<res.head.length;j++){
|
||||
html3+='<td>'+res.head[j].v+'</td>';
|
||||
}
|
||||
html3+='</tr>';
|
||||
if(res.gz=="bdk"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td "+res.body[j].body[2].s+">"+res.body[j].body[2].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdks"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td>"+res.body[j].body[2].v+"</td><td "+res.body[j].body[3].s+">"+res.body[j].body[3].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdgg"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td>"+res.body[j].body[2].v+"</td><td>"+res.body[j].body[3].v+"</td><td "+res.body[j].body[4].s+">"+res.body[j].body[4].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bds"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_bc("+res.body[j].bc+");'>"+res.body[j].body[0].v+"</a></td><td><a onclick='dk_color("+res.body[j].color+");'>"+res.body[j].body[1].v+"</a></td><td>"+res.body[j].body[2].v+"</td><td "+res.body[j].body[3].s+">"+res.body[j].body[3].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="byxdk"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td></tr>";
|
||||
}
|
||||
}else if(res.gz=="jebl"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_kh_dj("+res.body[j].kh_dj+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td "+res.body[j].body[2].s+">"+res.body[j].body[2].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdkshi"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td>";
|
||||
for(var k=0;k<res.body[j].kh.length;k++){
|
||||
html3+="<a onclick='dk_single("+res.body[j].kh[k].khid+");'>"+res.body[j].kh[k].kh+"</a>, ";
|
||||
}
|
||||
html3+="</td><td>"+res.body[j].body[0].v+"</td><td "+res.body[j].body[1].s+">"+res.body[j].body[1].v+"</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
html1+=" lay-id='"+res.arr_gz[i].k+"'>"+res.arr_gz[i].v+"</li>";
|
||||
html2+="'>"+html3+"</div>";
|
||||
}
|
||||
html1+="</ul>"+html2;
|
||||
$("#tabgz").html(html1);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
//监听屏幕旋转
|
||||
$(window).on("orientationchange",function(){
|
||||
if(index_dk_single)
|
||||
parent.layer.full(index_dk_single);
|
||||
})
|
||||
element.on('tab(tabgz)', function(data){
|
||||
console.log(data); //得到当前Tab的所在下标
|
||||
//var lid=$(".layui-tab-title .layui-this").attr("lay-id");
|
||||
//console.log(lid);
|
||||
var gz=$(".layui-tab-title .layui-this").attr("lay-id");
|
||||
var url1="./?_m=dhgz&my_gz_type="+gz;
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
async:false,
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
var res=$.parseJSON(res);
|
||||
//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{
|
||||
console.log(res);
|
||||
arrgz=res.arr_gz;
|
||||
var html1="<ul class='layui-tab-title'>";
|
||||
var html2="<div class='layui-tab-content'>";
|
||||
for(var i=0;i<res.arr_gz.length;i++){
|
||||
html1+="<li";
|
||||
html2+="<div class='layui-tab-item";
|
||||
var html3="";
|
||||
if(res.arr_gz[i].k==res.gz){
|
||||
html1+=" class='layui-this'";
|
||||
html2+=" layui-show";
|
||||
|
||||
html3+="<table lay-filter='layui_table' cellspacing='0' cellpadding='0' border='0' class='layui-table'><tr style='background:#f5f5f5;'>";
|
||||
for(var j=0;j<res.head.length;j++){
|
||||
html3+='<td>'+res.head[j].v+'</td>';
|
||||
}
|
||||
html3+='</tr>';
|
||||
if(res.gz=="bdk"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td "+res.body[j].body[2].s+">"+res.body[j].body[2].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdks"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td>"+res.body[j].body[2].v+"</td><td "+res.body[j].body[3].s+">"+res.body[j].body[3].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdgg"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td>"+res.body[j].body[2].v+"</td><td>"+res.body[j].body[3].v+"</td><td "+res.body[j].body[4].s+">"+res.body[j].body[4].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bds"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_bc("+res.body[j].bc+");'>"+res.body[j].body[0].v+"</a></td><td><a onclick='dk_color("+res.body[j].color+");'>"+res.body[j].body[1].v+"</a></td><td>"+res.body[j].body[2].v+"</td><td "+res.body[j].body[3].s+">"+res.body[j].body[3].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="byxdk"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_single("+res.body[j].khid+");'>"+res.body[j].body[0].v+"</a></td></tr>";
|
||||
}
|
||||
}else if(res.gz=="jebl"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td><a onclick='dk_kh_dj("+res.body[j].kh_dj+");'>"+res.body[j].body[0].v+"</a></td><td>"+res.body[j].body[1].v+"</td><td "+res.body[j].body[2].s+">"+res.body[j].body[2].v+"</td></tr>";
|
||||
}
|
||||
}else if(res.gz=="bdkshi"){
|
||||
for(var j=0;j<res.body.length;j++){
|
||||
html3+="<tr style='background:"+res.body[j].sty+";'><td>";
|
||||
for(var k=0;k<res.body[j].kh.length;k++){
|
||||
html3+="<a onclick='dk_single("+res.body[j].kh[k].khid+");'>"+res.body[j].kh[k].kh+"</a>, ";
|
||||
}
|
||||
html3+="</td><td>"+res.body[j].body[0].v+"</td><td "+res.body[j].body[1].s+">"+res.body[j].body[1].v+"</td></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
html1+=" lay-id='"+res.arr_gz[i].k+"'>"+res.arr_gz[i].v+"</li>";
|
||||
html2+="'>"+html3+"</div>";
|
||||
}
|
||||
html1+="</ul>"+html2;
|
||||
$("#tabgz").html(html1);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
//update_yd(2);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,106 @@
|
||||
<!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">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
||||
<script src="js/viewer/viewer.min.js"></script>
|
||||
<style>
|
||||
@media screen {
|
||||
#dhxz_iframe { height: 600px; }
|
||||
}
|
||||
@media screen and (max-height: 650px) {
|
||||
#dhxz_iframe { height: 500px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="width:100%;background-color:#fff;">
|
||||
<div style="width:100%; height:100%;float:left;" id="dhxz">
|
||||
<div class="layui-row" id="dhxz_title" style="font-size:20px;margin-top:10px;">
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="width:100%;float:left;margin-top:10px;height:100%;">
|
||||
<iframe src="" frameborder="0" name="dhxz_iframe" id="dhxz_iframe" width="100%" style="position:static;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
var is_mobile="n";
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index','form','table','user','rate','element'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var url1="./?_m=dhxz"+query_str;
|
||||
$.ajax({
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
console.log(["dhxz 初始", res])
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code=="101"){
|
||||
var html2="";
|
||||
html2+='<strong>'+res.title+'</strong>';
|
||||
$("#dhxz_title").html(html2);
|
||||
$("#dhxz_iframe").attr('style',"position:static;height:780px;");
|
||||
$("#dhxz_iframe").attr('src',res.url);
|
||||
}else if(res.code=="100"){
|
||||
var html2="";
|
||||
html2+='<strong>'+res.title+'</strong>';
|
||||
$("#dhxz_title").html(html2);
|
||||
$("#dhxz_iframe").attr('src',res.url);
|
||||
}else{
|
||||
layui.layer.alert(res.msg);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,684 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search{width:100%;text-align:left;background-color:#ffffff;height:59px;line-height:59px;}
|
||||
.search_con_more td{padding:0px;margin:0px;color:#000;}
|
||||
#form1_search_left{float:left;}
|
||||
#form1_search_right{float:right;}
|
||||
.button_more{width:100%;height:38px;line-height:38px;cursor:pointer;}
|
||||
.button_more_l{float:left;width:7px;height:38px;line-height:38px;background:url(images/button_more_l.png) center center no-repeat;}
|
||||
.button_more_m{float:left;background:url(images/button_more_m.png) center center repeat-x;padding-left:4px;padding-right:4px;color:#6c6c6c;}
|
||||
.button_more_r{float:left;width:24px;height:38px;line-height:38px;background:url(images/button_more_r.png) center center no-repeat;}
|
||||
.div_select_down{z-index:200;position:absolute;top:71px;left:12px;display:none;width:500px;line-height:30px;background-color:#ffffff;border:1px solid #e5e5e5;padding:10px;text-align:left;border-radius:5px 5px 5px 5px;}
|
||||
/*------------更多条件下拉框*/
|
||||
.div_select_down_close{position:absolute;cursor:pointer;top:2px;right:2px;}
|
||||
div.div_select_down{position:absolute;display:block;width:auto;height:auto;padding:6px 8px;color:#333333;border:solid 6px #262428;background-color:#f0f0f0;line-height:30px;margin-bottom:30px;-webkit-box-shadow:0px 0px 10px rgba(0,0,0,0.2);-moz-box-shadow:0px 0px 10px rgba(0,0,0,0.2);box-shadow:0px 0px 10px rgba(0,0,0,0.2);border-radius:5px;-ms-border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;z-index:2000}
|
||||
div.div_select_down span.arrow{display:block;position:absolute;width:17px;height:17px;}
|
||||
.select_down_list_selected{
|
||||
padding:8px;font-size:14px;background-color:#262428;border:1px solid #333333;cursor:pointer;color:#ffffff;white-space:nowrap;
|
||||
}
|
||||
.select_down_list_normal{
|
||||
padding:8px;font-size:14px;border:1px solid #a3a3a3;cursor:pointer;white-space:nowrap;
|
||||
}
|
||||
.div_more_button{width:100%;text-align:center;}
|
||||
.kh_list-container{background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
||||
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
||||
.kh_list-container .img{height:250px;line-height:250px;width:188px;z-index:1;overflow:hidden;cursor:pointer;}
|
||||
.kh_list-container .kh_hide{display:none;width:96%;position:absolute;bottom:74px;background:#f5f5f5;border-top-left-radius:10px;-moz-border-top-left-radius:10px;-webkit-border-top-left-radius:10px;border-top-right-radius:10px;-moz-border-top-right-radius:10px;-webkit-border-top-right-radius:10px;filter:alpha(Opacity=90);-moz-opacity:0.9;opacity: 0.9; z-index: 10;}
|
||||
.div_save_remark{float:left;width:80px;display:none;padding:4px;}
|
||||
.div_input_remark{padding:4px;}
|
||||
.div_button_del_pj{width:80px;padding:4px;}
|
||||
.kh_list-container .ydtype { position: absolute; left: 12px; top: 12px; z-index: 10; }
|
||||
.kh_list-container .ydtype .noreaded { display: inline-block; vertical-align: middle; position: relative; background-color: #d0d0d0; border-radius: 8px; margin-right: 4px; width: 28px; height: 28px; }
|
||||
.kh_list-container .ydtype .noreaded>span { transform: translate(-50%, -50%) rotate(-45deg); position: absolute; left: 50%; top: 50%; width: 30px; font-size: 12px; }
|
||||
.kh_list-container .ydtype .yd{ display: inline-block; vertical-align: middle; background:#d0d0d0;border: none; padding:4px 8px; border-radius: 8px; -moz-border-radius: 8px; -webkit-border-radius: 8px;color:#262428; font-size: 14px; }
|
||||
.kh_list-container .kh_dj{position:absolute;top:226px;right:8px;height:20px;line-height:20px;background:#262428;padding:4px;color:#f5f5f5;text-align:center;}
|
||||
.kh_info {height:68px;background-color:#f5f5f5; position: relative;}
|
||||
.kh_info_left {float:left;height:50px;line-height:50px;padding-top:8px;padding-left:4px;}
|
||||
.kh_info_left .yph{position:absolute;margin:4px;width:42px;height:42px;line-height:42px;background:#d0d0d0;text-align:center;border-radius:25px;-moz-border-radius:25px;-webkit-border-radius:25px;color:#ffffff;font-weight:bold;}
|
||||
.kh_info_left .xj{position:absolute;left: 58px;margin-top:18px;height:30px;line-height:30px;}
|
||||
.kh_info_left .kh {position: absolute;left: 58px;color: #595959;font-size: 1em;font-weight: bold;height: 28px;line-height: 28px;}
|
||||
.kh_info_right{float:right;padding-right:4px; padding-top: 8px; height: 28px; line-height: 28px;text-align:right;}
|
||||
.kh_info_right .price{text-align:center;color:#595959;font-size:1em;font-weight:bold;}
|
||||
.btn_yd_clicked{width:60px;height:35px;background-color:#262428;color:#ffffff;border:1px solid #262428;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;}
|
||||
.btn_yd_normal{width:60px;height:35px;background-color:#ffffff;color:#000000;border:1px solid #262428;border-right:0px;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;}
|
||||
.btn_wd_clicked{width:60px;height:35px;background-color:#262428;color:#ffffff;border:1px solid #262428;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;}
|
||||
.btn_wd_normal{width:60px;height:35px;background-color:#ffffff;color:#000000;border:1px solid #262428;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;}
|
||||
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="state_bar" style="display: none;">
|
||||
<div class="text_title">单款列表</div>
|
||||
<div class="btn_close" onclick="u_close_this_div();"><img src="images/close.png" width=30 height=30 border=0></div>
|
||||
</div>
|
||||
<!--搜索-->
|
||||
<form class="layui-form" name="form1_search" id="form1_search" method="get" action="dk.htm">
|
||||
<div class="search">
|
||||
<div id="form1_search_left">
|
||||
<span id="form1_search_left_pad">
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
<span id="select_single"></span>
|
||||
</span>
|
||||
<div class="layui-input-inline" id="search_con_more" class="search_con_more" onclick="show_hide_select_div()">
|
||||
<div class="button_more">
|
||||
<div class="button_more_l"></div>
|
||||
<div class="button_more_m" id="div_select_text">更多条件...</div>
|
||||
<div class="button_more_r"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div align="right" id="form1_search_right">
|
||||
<div class="layui-input-inline btn_ydwd" style="width:160px;"><input type="button" class="btn_yd_normal" id="btn_yd" value="已订"><input type="button" class="btn_wd_normal" id="btn_wd" value="未订"></div>
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
<div class="layui-input-inline" style="width:100px;"><input type="text" id="s_keyword" name="s_keyword" placeholder="款号或圆牌号" class="layui-input" autocomplete="on" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: none;"><input id="frombb" name="frombb" value=""></div>
|
||||
<!--更多条件-->
|
||||
<div id="div_select_down" class="div_select_down" style="display:none;">
|
||||
<div class="div_select_down_close"><img src="images/close.png" width="30" height="30" border=0 onclick="show_hide_select_div()" border=0></div>
|
||||
<div id="div_more_content"></div>
|
||||
<div class="div_more_button"><button type="button" id="btn_sub_select" class="layui-btn" style="background-color:#262428;">提 交</button> <button type="button" id="btn_reset_select" class="layui-btn" style="background-color:#262428;">清空条件</button></div>
|
||||
</div>
|
||||
<!--隐藏的submit按钮-->
|
||||
<div style="position:absolue;top:0px;left:0px;width:0px;height:0px;"><button lay-submit lay-filter="submit1" id="submit1"></button></div>
|
||||
</form>
|
||||
<!--图片列表-->
|
||||
<div class="layui-row u-list" id="edt_kh_content"></div>
|
||||
<script>
|
||||
//是否手机端
|
||||
var is_mobile="n";
|
||||
var index_dk_single="";
|
||||
var face='4';
|
||||
var index_by_color="n";
|
||||
function do_submit(){
|
||||
return false;
|
||||
}
|
||||
//处理扫描结果
|
||||
function deel_sm(ewm,_t){
|
||||
if(_t=="kh"){
|
||||
//window.location.href='./?_m=login_ewm&_d='+ewm;
|
||||
alert(ewm);
|
||||
}
|
||||
}
|
||||
//更新已订数据
|
||||
function update_yd(khid){
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
//获取预设数据
|
||||
var url="./?_m=dk&_a=get_wcl&index_by_color="+index_by_color+"&khid="+khid;
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
console.log('dk 更新', json_data)
|
||||
// 更新父窗口数据
|
||||
if (json_data.face == "4") 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);
|
||||
// ----------------------------打上已订件数标签
|
||||
if(index_by_color=="y"){
|
||||
var arr_color_list=json_data.list_color;
|
||||
for(var key in arr_color_list){
|
||||
var obj_ydjs = $("#ydjs_"+khid+"_"+key);
|
||||
if(obj_ydjs){
|
||||
var html1 = ''
|
||||
if(arr_color_list[key]>0) html1 += '<div class="yd">'+arr_color_list[key]+'件</div>';
|
||||
obj_ydjs.html(html1);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
var obj_ydjs=$("#ydjs_"+khid+"_nocolor");
|
||||
if(obj_ydjs){
|
||||
var html1 = ''
|
||||
if(json_data.ydjs>0) html1 += '<div class="yd">'+json_data.ydjs+'件</div>';
|
||||
obj_ydjs.html(html1);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
//
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
//显示更多条件框
|
||||
function show_hide_select_div(){
|
||||
layui.use('jquery', function(){
|
||||
var $=layui.jquery;
|
||||
var obj1=document.getElementById("div_select_down");
|
||||
var obj=$("#div_select_down");
|
||||
var w=$(document.body).width();
|
||||
obj.width(w-50);
|
||||
if(obj1.style.display=="none"){
|
||||
obj.show(500);
|
||||
//obj1.style.display="none";
|
||||
}else{
|
||||
//设置宽度
|
||||
obj.hide(500);
|
||||
//obj1.style.display="";
|
||||
}
|
||||
});
|
||||
}
|
||||
//显示,隐藏评价层
|
||||
function show_hide_kh_hide(id){
|
||||
layui.use('jquery', function(){
|
||||
var $=layui.jquery;
|
||||
var obj=$("#kh_hide_"+id);
|
||||
obj.toggle(500);
|
||||
});
|
||||
}
|
||||
//是否选中
|
||||
function check_selected(v1,s_key1){
|
||||
var r="n";
|
||||
var arr1=s_key1.split(",");
|
||||
for(var i=0;i<arr1.length;i++){
|
||||
if(arr1[i]==v1){
|
||||
r="y";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//取得选项html
|
||||
function get_select_down_list(cate,cate_title,arr1,s_key1,t1){
|
||||
//
|
||||
var str="";
|
||||
var arr_tmp=[];
|
||||
var class1=class2="select_down_list_normal";
|
||||
var op1="checkbox";
|
||||
var op_str="";
|
||||
for(var j=0;j<arr1.length;j++){
|
||||
op_str+=arr1[j].no+'|'+arr1[j].title+',';
|
||||
}
|
||||
if(op_str)
|
||||
op_str=op_str.substring(0,op_str.length-1);
|
||||
if(cate=="ka" || cate=="is_ordered" || arr1.length<3){
|
||||
op1="radio";
|
||||
}
|
||||
class1=(s_key1=="")?"select_down_list_selected":"select_down_list_normal";
|
||||
str+="<tr>";
|
||||
str+="<td height=\"40\" width=\"90\" align=\"right\" style=\"line-height:30px;\">";
|
||||
if(t1!="")
|
||||
str+="<span id=\""+cate+"_all\" class=\""+class1+"\" onclick=\"click_select('"+cate+"','"+op_str+"','all','"+op1+"')\"><b>"+cate_title+"</b></span>";
|
||||
str+=" </td><td style=\"line-height:40px;\">";
|
||||
str+="<input type=\"hidden\" name=\"s_"+cate+"\" id=\"s_"+cate+"\" value=\""+s_key1+"\">";
|
||||
for(var j=0;j<arr1.length;j++){
|
||||
if(class1=="select_down_list_selected"){
|
||||
class2="select_down_list_normal";
|
||||
}else{
|
||||
class2=check_selected(arr1[j].no,s_key1)=="y"?"select_down_list_selected":"select_down_list_normal";
|
||||
}
|
||||
var op2="";
|
||||
if(cate=="pjxj")
|
||||
op2="radio";
|
||||
else
|
||||
op2=op1;
|
||||
str+="<span id=\""+cate+"_"+arr1[j].no+"\" class=\""+class2+"\" onclick=\"click_select('"+cate+"','"+op_str+"','"+arr1[j].no+"','"+op2+"')\">"+arr1[j].title+"</span> ";
|
||||
}
|
||||
str+="</td></tr>";
|
||||
return str;
|
||||
}
|
||||
//点击选项
|
||||
function click_select(c1,op_str,v1,op1){
|
||||
var a1=op_str.split(",");
|
||||
var obj_self=document.getElementById(c1+"_"+v1);
|
||||
if(obj_self.className=="select_down_list_selected"){
|
||||
if(op1=="radio")
|
||||
obj_self.className="select_down_list_selected";
|
||||
else
|
||||
obj_self.className="select_down_list_normal";
|
||||
}else{
|
||||
obj_self.className="select_down_list_selected";
|
||||
}
|
||||
var str="";
|
||||
if(op1=="radio"){
|
||||
//单选
|
||||
for(var i=0;i<a1.length;i++){
|
||||
var arr2=a1[i].split("|");
|
||||
obj_self=document.getElementById(c1+"_"+arr2[0]);
|
||||
if(arr2[0]!=v1){
|
||||
obj_self.className="select_down_list_normal";
|
||||
}else{
|
||||
str=arr2[0];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//多选
|
||||
if(v1=="all"){
|
||||
for(var i=0;i<a1.length;i++){
|
||||
var arr2=a1[i].split("|");
|
||||
obj_self=document.getElementById(c1+"_"+arr2[0]);
|
||||
obj_self.className="select_down_list_normal";
|
||||
}
|
||||
str="";
|
||||
}else{
|
||||
for(var i=0;i<a1.length;i++){
|
||||
var arr2=a1[i].split("|");
|
||||
obj_self=document.getElementById(c1+"_"+arr2[0]);
|
||||
if(obj_self.className=="select_down_list_selected")
|
||||
str+=arr2[0]+",";
|
||||
}
|
||||
if(str)
|
||||
str=str.substring(0,str.length-1);
|
||||
if(str.split(",").length==a1.length){
|
||||
//选择所有
|
||||
for(var i=0;i<a1.length;i++){
|
||||
var arr2=a1[i].split("|");
|
||||
obj_self=document.getElementById(c1+"_"+arr2[0]);
|
||||
obj_self.className="select_down_list_normal";
|
||||
}
|
||||
str="";
|
||||
}
|
||||
}
|
||||
}
|
||||
//设置全部
|
||||
if(document.getElementById(c1+"_all")){
|
||||
if(str=="")
|
||||
document.getElementById(c1+"_all").className="select_down_list_selected";
|
||||
else
|
||||
document.getElementById(c1+"_all").className="select_down_list_normal";
|
||||
}
|
||||
document.getElementById("s_"+c1).value=str;
|
||||
}
|
||||
//设置更多条件的文字
|
||||
function set_select_text(arr_select){
|
||||
var obj=document.getElementById("div_select_text");
|
||||
var arr1=[];
|
||||
var c1=t1=v1="";
|
||||
for(var i=0;i<arr_select.length;i++){
|
||||
c1=arr_select[i].no;
|
||||
arr1=arr_select[i].op;
|
||||
v1=document.getElementById("s_"+c1).value;
|
||||
if((is_mobile=="n" && c1!="is_ordered") || is_mobile=="y"){//不显示已订,未订
|
||||
if(v1!="" && c1!="ka"){
|
||||
var v1_a=v1.split(",");
|
||||
for(var i2=0;i2<v1_a.length;i2++){
|
||||
t1+=get_obj_title(arr1,v1_a[i2])+",";
|
||||
}
|
||||
}else{
|
||||
if(v1=="y")
|
||||
t1+="仅删除款,";
|
||||
}
|
||||
}
|
||||
}
|
||||
var len=(is_mobile=="n")?20:14;
|
||||
if(t1)
|
||||
obj.innerHTML=deel_select_text(sub_str_gb(t1.substring(0,t1.length-1),len));
|
||||
else
|
||||
obj.innerHTML=" 更多条件 ";
|
||||
deel_select_text(t1);
|
||||
}
|
||||
//截取字串,支持中文
|
||||
function sub_str_gb(str,len){
|
||||
var strlen=str.length;
|
||||
if(strlen<=len){
|
||||
return str;
|
||||
}else{
|
||||
return str.substring(0,len)+"...";
|
||||
}
|
||||
}
|
||||
//根据obj的no,取得title
|
||||
function get_obj_title(arr1,v1){
|
||||
var r="";
|
||||
for(var i1=0;i1<arr1.length;i1++){
|
||||
if(arr1[i1].no==v1){
|
||||
r=arr1[i1].title;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//格式化更多条件的显示文字
|
||||
function deel_select_text(t1){
|
||||
var r="";
|
||||
var min_length=9;
|
||||
if(t1.length<min_length){
|
||||
var k=Math.ceil((min_length-t1.length)/2);
|
||||
for(var i=0;i<k;i++){
|
||||
r+=" ";
|
||||
}
|
||||
r+=t1;
|
||||
for(var i=0;i<k;i++){
|
||||
r+=" ";
|
||||
}
|
||||
}else{
|
||||
r=t1;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//单款详情
|
||||
function dk_single(id){
|
||||
layui.use(['layer', 'jquery'], function(){
|
||||
const $ = layui.jquery
|
||||
|
||||
if(face=='2')
|
||||
var url1="dk_single_qj.htm";
|
||||
else
|
||||
var url1="dk_single.htm";
|
||||
var layer = parent.layer;
|
||||
index_dk_single = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: url1+'?khid='+id,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2,
|
||||
});
|
||||
layer.full(index_dk_single);
|
||||
|
||||
const ydElem = $('#ydjs_'+id+'_nocolor .yd')
|
||||
,ydHtml = ydElem.length > 0 ? '<div class="yd">' + ydElem.html() + '</div>' : ''
|
||||
$('#ydjs_'+id+'_nocolor').html(ydHtml)
|
||||
});
|
||||
}
|
||||
//取得瀑布流单款html
|
||||
function get_list_html(data1,content_set, is_gg){
|
||||
var html1='';
|
||||
html1+='<div class="u-list-item layui-col-lg2 layui-col-md3 layui-col-sm4 layui-col-xs6"><div class="kh_list-container" id="kh_'+data1.id+'">';
|
||||
//---------------图片
|
||||
html1+='<div class="img" onclick="dk_single('+data1.id+');" style="background-color:'+content_set+';"><img src="'+data1.pic+'" width="'+data1.pic_w+'" height="'+data1.pic_h+'" watermark></div>';
|
||||
if (json_data.bs_kh_dj == "word" && data1.kh_dj) {
|
||||
html1 += "<div class='kh-dj' style='position: absolute; top: 12px; right: 12px; width: 18px; word-wrap: break-word; background-color: #F06054; color: white; padding: 4px 2px; border-radius: 4px; z-index: 9;'>"+ data1.kh_dj +"</div>"
|
||||
} else if (json_data.bs_kh_dj == "pic" && data1.kh_dj) {
|
||||
html1 += "<div class='kh-dj' style='position: absolute; top: 12px; right: 12px;'><img src='../attachments/"+encodeURI(data1.kh_dj)+".png'></div>"
|
||||
}
|
||||
//---------------评价星级大,可评价
|
||||
html1+='<div id="kh_hide_'+data1.id+'" class="kh_hide">';
|
||||
html1+='<div id="div_pj_'+data1.id+'_icon_big">'+get_pj_icon(data1.xj,data1.id,"big","y")+'</div>';
|
||||
//文字评价输入框
|
||||
html1+='<div id="remark_'+data1.id+'" class="div_input_remark"><input type="text" id="input_remark_'+data1.id+'" placeholder="请输入评价文字" autocomplete="off" class="layui-input" style="height:28px;" onfocus="pj_remark_focus('+data1.id+')" onblur="pj_remark_blur('+data1.id+',\''+data1.pj_remark+'\')" value="'+data1.pj_remark+'"></div>';
|
||||
//保存文字按钮
|
||||
html1+='<div id="div_save_remark_'+data1.id+'" class="div_save_remark"><button class="layui-btn layui-btn-sm button_save_remark" id="button_save_remark_'+data1.id+'" onclick="save_pj_remark('+data1.id+',\''+data1.pj_remark+'\')">保存文字</botton></div>';
|
||||
//删除评价按钮
|
||||
var dis1="none";
|
||||
if(data1.xj>0)
|
||||
dis1="block";
|
||||
html1+='<div class="div_button_del_pj" style="display:'+dis1+';" id="div_button_del_pj_'+data1.id+'"><button id="button_del_pj_'+data1.id+'" class="layui-btn layui-btn-sm button_del_pj" onclick="del_pj('+data1.id+')">删除评价</botton></div>';
|
||||
//
|
||||
html1+='</div>';
|
||||
//---------------已订件数
|
||||
html1+='<span class="ydtype" id="ydjs_'+data1.id+'_'+data1.color+'">';
|
||||
if (data1.is_read === 'n') html1 += '<div class="noreaded"><span>未看</span></div>'
|
||||
if(data1.ydjs>0)
|
||||
html1+='<div class="yd">'+data1.ydjs+'件</div>';
|
||||
html1+='</span>';
|
||||
|
||||
if(index_by_color=="y"){
|
||||
//到色是显示颜色
|
||||
html1+='<div class="-choose" style="position: absolute; line-height: 30px; left: 12px; bottom: 80px; text-align: left;border:1px solid #ccc;">'+data1.color_title+'</div>';
|
||||
}
|
||||
//---------------款号等级
|
||||
if(data1.khdj && data1.khdj!="")
|
||||
html1+='<div class="kh_dj">'+data1.khdj+'</div>';
|
||||
//kh_info
|
||||
html1+='<div class="kh_info">';
|
||||
//left
|
||||
html1+='<div class="kh_info_left">';
|
||||
//---------------圆牌号
|
||||
html1+='<div class="yph">'+data1.xh+'</div>';
|
||||
//---------------款号和价格
|
||||
// html1 += '<div class="kh-and-price">'
|
||||
// html1+='<div class="kh">'+data1.kh+'</div>';
|
||||
// if(data1.price>0)
|
||||
// html1+='<div class="price">¥'+data1.price+'</div>';
|
||||
// html1 += '</div>'
|
||||
html1+='<div class="kh">'+data1.kh+'</div>';
|
||||
//---------------评价星级小
|
||||
html1+='<div class="xj" id="div_pj_'+data1.id+'_icon_mini" onclick="show_hide_kh_hide('+data1.id+')">'+get_pj_icon(data1.xj,data1.id,"mini","n")+'</div>';
|
||||
html1+='</div>';
|
||||
//right
|
||||
html1+='<div class="kh_info_right">';
|
||||
//---------------价格
|
||||
if(is_gg != 'y' && data1.price>0)
|
||||
html1+='<div class="price">¥'+data1.price+'</div>';
|
||||
html1+='</div>';
|
||||
html1+='</div>';
|
||||
//----kh_info
|
||||
|
||||
html1+='</div></div>';
|
||||
return html1;
|
||||
}
|
||||
var data_select_all=[];
|
||||
//
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','flow','util'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
|
||||
if (get_url_param("frombb") == "y") {
|
||||
$(".state_bar").show()
|
||||
}
|
||||
|
||||
var rate = layui.rate;
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var page=1;
|
||||
//流加载
|
||||
var flow = layui.flow;
|
||||
//选项数组
|
||||
flow.load({
|
||||
elem: '#edt_kh_content'
|
||||
,scrollElem:'#edt_kh_content'
|
||||
,end:'<div style="width:100%;height:30px;line-height:30px;clear:both;" id="flow_end">加载完成了</div>'
|
||||
,done: function(page, next){
|
||||
var lis = [];
|
||||
var url1='./?_m=dk&page='+page+query_str;
|
||||
//alert(url1);
|
||||
$.get(url1,function(res){
|
||||
json_data=$.parseJSON(res);
|
||||
var total_num=json_data.count;
|
||||
//
|
||||
face=json_data.face;
|
||||
//是否到色
|
||||
index_by_color=json_data.list_by_color;
|
||||
//
|
||||
if(json_data.last_path && json_data.last_path=="iphone")
|
||||
is_mobile="y";
|
||||
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{
|
||||
//
|
||||
console.log(["dk 初始", json_data])
|
||||
var is_select_single=(is_mobile=="y")?"n":"y";
|
||||
var data1=json_data.select_single;
|
||||
var i2=0;
|
||||
|
||||
$("#frombb").val(get_url_param("frombb"))
|
||||
if (get_url_param("frombb") == "y") $("body").css("margin-top", "auto")
|
||||
|
||||
for(var i2=0;i2<data1.length;i2++){
|
||||
data_select_all[i2]=data1[i2];
|
||||
}
|
||||
if(is_select_single=="y"){
|
||||
//单独下拉字段
|
||||
var html1="";
|
||||
for(var i=0;i<data1.length;i++){
|
||||
html1+='<div class="layui-input-inline" style="width:100px;"><select name="s_'+data1[i].no+'" lay-filter="select_single"><option value="">-'+data1[i].title+'-</option>';
|
||||
var op=data1[i].op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==data1[i].value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
$("#select_single").html(html1);
|
||||
}
|
||||
//更多条件
|
||||
var data1=json_data.select_more;
|
||||
for(var i1=0;i1<data1.length;i1++,i2++){
|
||||
data_select_all[i2]=data1[i1];
|
||||
}
|
||||
if(is_select_single=="y"){
|
||||
var data3=data1;
|
||||
}else{
|
||||
var data3=data_select_all;
|
||||
}
|
||||
html1='<table border="0" width="100%" cellspacing="3" cellpadding="1" align="left">';
|
||||
var is_ordered="";
|
||||
for(var i=0;i<data3.length;i++){
|
||||
if(data3[i].no=="ka")
|
||||
html1+=get_select_down_list(data3[i].no,data3[i].title,data3[i].op,data3[i].value,"");
|
||||
else
|
||||
html1+=get_select_down_list(data3[i].no,data3[i].title,data3[i].op,data3[i].value,"全部");
|
||||
if(data3[i].no=="is_ordered")
|
||||
is_ordered=data3[i].value;
|
||||
}
|
||||
html1+='</table>';
|
||||
$("#div_more_content").html(html1);
|
||||
//设置条件文字
|
||||
set_select_text(data1);
|
||||
if(is_mobile=="n"){
|
||||
//已订未订
|
||||
var yd_class="btn_yd_normal";
|
||||
var wd_class="btn_wd_normal";
|
||||
if(is_ordered=="y"){
|
||||
yd_class="btn_yd_clicked";
|
||||
}else if(is_ordered=="n"){
|
||||
wd_class="btn_wd_clicked";
|
||||
}
|
||||
document.getElementById("btn_yd").className=yd_class;
|
||||
document.getElementById("btn_wd").className=wd_class;
|
||||
}else{
|
||||
$(".btn_ydwd").hide();
|
||||
}
|
||||
//关键字
|
||||
var s_keyword="";
|
||||
if(json_data.s_keyword)
|
||||
s_keyword=json_data.s_keyword;
|
||||
$("#s_keyword").val(s_keyword);
|
||||
//加载图片列表
|
||||
var data=json_data.data;
|
||||
var html1='';
|
||||
for(var i=0;i<data.length;i++){
|
||||
html1=get_list_html(data[i],json_data.content_set, json_data.is_gg);
|
||||
var elem = $(html1)
|
||||
USetWatermark({
|
||||
el: elem,
|
||||
is_sy: json_data.is_sy,
|
||||
text: json_data.username,
|
||||
mode: "outer"
|
||||
})
|
||||
lis.push(elem[0].outerHTML)
|
||||
}
|
||||
next(lis.join(''), page<json_data.total_page);
|
||||
// 限制图片宽度防止超出父元素尺寸
|
||||
$(".kh_list-container .img").css("max-width", $(".kh_list-container").width())
|
||||
$(".kh_list-container .img img").css("max-width", $(".kh_list-container").width())
|
||||
//
|
||||
total_page=json_data.total_page;
|
||||
form.render();
|
||||
var obj1=$("#flow_end");
|
||||
if(obj1 && total_num>0)
|
||||
obj1.html("加载完成了"+total_num+"条");
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//返回顶部按钮
|
||||
var util = layui.util;
|
||||
//执行
|
||||
//util.fixbar();
|
||||
util.fixbar({
|
||||
//bar1: '',
|
||||
top: true,
|
||||
click: function(type){
|
||||
if (type === 'top') {
|
||||
//layer.msg('返回顶部')
|
||||
//$('#edt_kh_content').scrollTop(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
//
|
||||
//点击已订按钮
|
||||
$("#btn_yd").click(function(){
|
||||
var obj=$("#s_is_ordered");
|
||||
if(this.className=="btn_yd_clicked"){
|
||||
obj.val("");
|
||||
}else{
|
||||
obj.val("y");
|
||||
}
|
||||
$("#s_keyword").val("");
|
||||
$("#form1_search").submit();
|
||||
})
|
||||
//点击未订按钮
|
||||
$("#btn_wd").click(function(){
|
||||
var obj=$("#s_is_ordered");
|
||||
if(this.className=="btn_wd_clicked"){
|
||||
obj.val("");
|
||||
}else{
|
||||
obj.val("n");
|
||||
}
|
||||
$("#s_keyword").val("");
|
||||
$("#form1_search").submit();
|
||||
})
|
||||
//点击清空条件按钮
|
||||
$("#btn_reset_select").click(function(){
|
||||
var url="dk.htm";
|
||||
window.location.href=url;
|
||||
})
|
||||
//点击提交按钮
|
||||
$("#btn_sub_select").click(function(){
|
||||
$("#s_keyword").val("");
|
||||
$("#form1_search").submit();
|
||||
})
|
||||
//点击查询条件
|
||||
form.on('select(select_single)', function(data){
|
||||
$("#s_keyword").val("");
|
||||
$("#form1_search").submit();
|
||||
});
|
||||
//提交
|
||||
form.on("submit(submit1)",function(data){
|
||||
var post_data=data.field;
|
||||
$("#submit1").focus();
|
||||
//alert(JSON.stringify(post_data));
|
||||
return true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!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" />
|
||||
</head>
|
||||
|
||||
<script>
|
||||
const pathname = location.pathname
|
||||
if (pathname.indexOf('iphone') > -1) location.href = "dk_single_phone.htm"+location.search
|
||||
else if (pathname.indexOf('ipad') > -1) location.href = "dk_single_pad.htm"+location.search
|
||||
</script>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,670 @@
|
||||
<!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">
|
||||
<style>
|
||||
.pcki-page {overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch;}
|
||||
.content #info .title{color: #9b9b9b; text-align: right;}
|
||||
.content #info .text{font-weight: bold; text-align: left;}
|
||||
#dds td { padding: 1px; }
|
||||
#dds .dd-row input { max-width: 80px; margin: auto; }
|
||||
.div_input_remark {margin-bottom: 10px;}
|
||||
.div_save_remark {width:80px; padding:4px; display: inline-block;}
|
||||
.div_button_del_pj {padding: 4px; display: inline-block;}
|
||||
</style>
|
||||
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
<!-- viewer js -->
|
||||
<script src="js/viewer/viewer.min.js"></script>
|
||||
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="pcki-page">
|
||||
<!-- 顶部标题栏 -->
|
||||
<div class="state_bar">
|
||||
<div class="text_title">单款区经详情</div>
|
||||
<div class="btn_close" onclick="u_close_this_div();"><img src="images/close.png" width=30 height=30 border=0></div>
|
||||
</div>
|
||||
<!--头部 上下款 搜索-->
|
||||
<div class="header">
|
||||
<a id="btn-prev" class="-btn-into" style="position: absolute; top: 0; left: 20px;"><i class="layui-icon layui-icon-left"></i>上一款</a>
|
||||
<div id="s-title" class="layui-input-inline" style="width: 20%; margin-right: 10px; max-width: 150px; min-width: 100px;"><input type="text" name="" placeholder="款号或圆牌号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<a id="btn-search" class="layui-btn layui-input-inline" style="border-radius:10px 10px 10px 10px; background-color: #F04122; padding: 0 10px;">查询</a>
|
||||
<a id="btn-next" class="-btn-into" style="position: absolute; top: 0; right: 20px;">下一款<i class="layui-icon layui-icon-right"></i></a>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 信息层 平板版 -->
|
||||
<div id="content" class="content -for-pad layui-row layui-col-space10" style="padding: 0 10px;">
|
||||
<div class="layui-col-lg8 layui-col-md8 layui-col-sm8 layui-col-xs6 layui-col-xxs12">
|
||||
<div id="pic" style="position: relative;">
|
||||
<div id="show-for-pad" class="-show" watermark></div>
|
||||
<div class="-choose" style="position: absolute; line-height: 50px; left: 0; bottom: 0; text-align: left;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="info" class="layui-col-lg4 layui-col-md4 layui-col-sm4 layui-col-xs6 layui-col-xxs12">
|
||||
<div id="gz" class="layui-row"><div class="layui-col-xs12 layui-col-sm12 layui-col-md12 layui-col-lg12"><div class="layui-col-lg6" style="color:#00A1F8; font-weight: bold;"><i class="layui-icon layui-icon-tips" style="display: inline-block; vertical-align: middle; margin-right: 5px;"></i><span class="text" style="display: inline-block; vertical-align: middle;"></span></div></div></div>
|
||||
<div id="yph" class="layui-row layui-col-space10"><span class="title layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">圆牌号</span><span class="text layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8"></span></div>
|
||||
<div id="kh" class="layui-row layui-col-space10"><span class="title layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">款号</span><span class="text layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8"></span></div>
|
||||
<div id="price" class="layui-row layui-col-space10"><span class="title layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">价格</span><span class="text layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8"></span></div>
|
||||
<div id="ksm" class="layui-row layui-col-space10"><span class="title layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">款式名</span><span class="text layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8"></span></div>
|
||||
<div id="zds"></div>
|
||||
<div id="remark" class="layui-row layui-col-space10"><span class="title layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">备注</span><span class="text layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8"></span></div>
|
||||
<hr class="layui-bg-gray">
|
||||
<div id="xj">
|
||||
<span style="display: inline-block; vertical-align: middle; color: #9b9b9b;">我的评分</span>
|
||||
<span id="xj-item" style="display: inline-block; vertical-align: middle;"></span>
|
||||
</div>
|
||||
<div id="pjwz" style="margin: 10px 0;"></div>
|
||||
<div id="ds"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 信息层 手机版 #1 -->
|
||||
<div id="content" class="content -for-phone layui-row layui-col-space10" style="padding: 0 10px; display: none;">
|
||||
<div class="layui-col-lg12 layui-col-md12 layui-col-sm12 layui-col-xs12 layui-col-xxs12">
|
||||
<div id="pic" style="position: relative;">
|
||||
<div id="show-for-phone" class="-show" watermark></div>
|
||||
<div class="-choose" style="position: absolute; line-height: 50px; left: 0; bottom: 0; text-align: left;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg12 layui-col-md12 layui-col-sm12 layui-col-xs12 layui-col-xxs12">
|
||||
<div id="xj">
|
||||
<span style="display: inline-block; vertical-align: middle; color: #9b9b9b;">我的评分</span>
|
||||
<span id="xj-item" style="display: inline-block; vertical-align: middle;"></span>
|
||||
</div>
|
||||
<div id="pjwz" style="margin: 10px 0;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 订单详细 -->
|
||||
<table id="dds" style="width: 96%; margin: auto;"></table>
|
||||
<!-- 信息层 手机版 #2 -->
|
||||
<div id="content" class="content -for-phone layui-row layui-col-space10" style="padding: 0 10px; display: none;">
|
||||
<hr class="layui-bg-gray" style="padding: 0;">
|
||||
<div id="info" class="layui-col-lg12 layui-col-md12 layui-col-sm12 layui-col-xs12 layui-col-xxs12">
|
||||
<div id="gz" class="layui-row"><div class="layui-col-xs12 layui-col-sm12 layui-col-md12 layui-col-lg12"><div class="layui-col-lg6" style="color:#00A1F8; font-weight: bold;"><i class="layui-icon layui-icon-tips" style="display: inline-block; vertical-align: middle; margin-right: 5px;"></i><span class="text" style="display: inline-block; vertical-align: middle;"></span></div></div></div>
|
||||
<div id="yph" class="layui-row layui-col-space10"><span class="title layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">圆牌号</span><span class="text layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6"></span></div>
|
||||
<div id="kh" class="layui-row layui-col-space10"><span class="title layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">款号</span><span class="text layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6"></span></div>
|
||||
<div id="price" class="layui-row layui-col-space10"><span class="title layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">价格</span><span class="text layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6"></span></div>
|
||||
<div id="ksm" class="layui-row layui-col-space10"><span class="title layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">款式名</span><span class="text layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6"></span></div>
|
||||
<div id="zds"></div>
|
||||
<div id="remark" class="layui-row layui-col-space10"><span class="title layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6">备注</span><span class="text layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6"></span></div>
|
||||
<hr class="layui-bg-gray">
|
||||
<div id="ds"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- </form> -->
|
||||
<!-- 细节图 -->
|
||||
<div class="xjs-belonging" style="text-align: left; padding: 0 10px;">细节图</div>
|
||||
<div id="xjs" class="xjs-belonging layui-row" style="padding: 0 10px;"></div>
|
||||
<hr class="xjs-belonging layui-bg-gray">
|
||||
<!-- 相关搭配款 -->
|
||||
<div class="dpks-belonging" style="text-align: left; padding: 0 10px;">相关搭配款</div>
|
||||
<div id="dpks" class="dpks-belonging layui-row" style="padding: 0 10px;"></div>
|
||||
<hr class="dpks-belonging layui-bg-gray">
|
||||
<!-- 相关搭配 -->
|
||||
<div class="dps-belonging" style="text-align: left; padding: 0 10px;">相关搭配</div>
|
||||
<div id="dps" class="dps-belonging layui-row" style="padding: 0 10px;"></div>
|
||||
<hr class="dps-belonging layui-bg-gray">
|
||||
<!-- 相关陈列 -->
|
||||
<div class="cls-belonging" style="text-align: left; padding: 0 10px;">相关陈列</div>
|
||||
<div id="cls" class="cls-belonging layui-row" style="padding: 0 10px;"></div>
|
||||
<hr class="cls-belonging layui-bg-gray">
|
||||
<!-- 相关橱窗 -->
|
||||
<div class="ccs-belonging" style="text-align: left; padding: 0 10px;">相关橱窗</div>
|
||||
<div id="ccs" class="ccs-belonging layui-row" style="padding: 0 10px;"></div>
|
||||
<hr class="ccs-belonging layui-bg-gray">
|
||||
|
||||
</div>
|
||||
<!-- end pcki-page -->
|
||||
<script>
|
||||
var is_mobile="n"
|
||||
,dk_data = {} // 单款全局数据
|
||||
,isPadOrPhone = "pad" // 判断客户端属于平板还是手机
|
||||
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','element'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form
|
||||
,element = layui.element
|
||||
|
||||
if (get_url_param("khid") == "") layui.layer.msg("款号id错误!")
|
||||
else $.ajax(
|
||||
{
|
||||
url:"./?_m=dk&_a=single_qj&khid="+get_url_param("khid"),
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
//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;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent;
|
||||
obj1.location.href=url1;
|
||||
}else if(json_data.code==2){
|
||||
//------------------重新登录
|
||||
url1="login.htm?error_msg="+json_data.msg;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent;
|
||||
obj1.location.href=url1;
|
||||
}else{
|
||||
//------------------填充内容
|
||||
console.log(["初始", json_data])
|
||||
|
||||
if (window.parent.innerWidth >= 600) isPadOrPhone = "pad"
|
||||
else isPadOrPhone = "phone"
|
||||
|
||||
if (isPadOrPhone == "pad") {
|
||||
$(".content.-for-pad").show()
|
||||
$(".content.-for-phone").hide()
|
||||
} else if (isPadOrPhone == "phone") {
|
||||
$(".content.-for-pad").hide()
|
||||
$(".content.-for-phone").show()
|
||||
}
|
||||
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
|
||||
dk_data = json_data
|
||||
// dds_data = json_data.dds
|
||||
//------------上一款
|
||||
if (json_data.prev != "") {
|
||||
$("#btn-prev").attr("href", "dk_single_qj.htm?khid="+json_data.prev)
|
||||
} else {
|
||||
$("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一款了。')")
|
||||
}
|
||||
//------------下一款
|
||||
if (json_data.next != "") {
|
||||
$("#btn-next").attr("href", "dk_single_qj.htm?khid="+json_data.next)
|
||||
} else {
|
||||
$("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一款了。')")
|
||||
}
|
||||
//------------展示图片与短视频
|
||||
var temp_pic_n = 0
|
||||
// json_data.vurl = "http://47.114.132.88/1.mp4"
|
||||
// 修改短视频后
|
||||
for (var n = 0; n < json_data.pics.length; n++, temp_pic_n++) {
|
||||
var pic = json_data.pics[n]
|
||||
$(".content #pic .-show").append("<img class='-target' src='"+pic.pic_big+"' data-original='"+pic.pic_big+"' style='"+(n == 0 && n == temp_pic_n ? "" : "display: none; ")+"width: "+pic.pic_big_w+"px; height: "+pic.pic_big_h+"px; max-width: 300px; max-height: 400px;' watermark>")
|
||||
$(".content #pic .-choose").append("<a index='"+(temp_pic_n+1)+"' class='-item' style='width: 30px; height: 42px; line-height: 42px; margin: 1px; display: inline-block; border: solid 1px "+(n == 0 && n == temp_pic_n ? "#F04122" : "#9b9b9b")+"; text-align: center; cursor: pointer; vertical-align: middle;'><img src='"+pic.pic+"' style='width: "+pic.pic_w+"px; height: "+pic.pic_h+"px; max-width: 30px; max-height: 40px;' watermark></a>")
|
||||
}
|
||||
if (json_data.vurl) {
|
||||
$(".content #pic .-show").append("<video controls='controls' class='-target' style='max-width: 280px; max-height: 340px; margin-top: 10px;'></video>")
|
||||
$(".content #pic .-choose").append("<a index='"+(temp_pic_n+1)+"' class='-item' style='width: 30px; height: 42px; line-height: 42px; margin: 1px; display: inline-block; text-align: center; cursor: pointer; vertical-align: middle;'><i class='layui-icon layui-icon-play' style='width: 30px;'></i></a>")
|
||||
temp_pic_n++
|
||||
}
|
||||
if (json_data.bs_kh_dj == "word" && json_data.kh_dj) {
|
||||
$(".content #pic").append("<span style='position: absolute; top: 8px; right: 8px; width: 18px; word-wrap: break-word; background-color: #F06054; color: white; padding: 4px 2px; border-radius: 4px; z-index: 9; line-height: 20px;'>"+json_data.kh_dj+"</span>")
|
||||
} else if (json_data.bs_kh_dj == "pic" && json_data.kh_dj) {
|
||||
$(".content #pic").append("<img src='../attachments/"+json_data.kh_dj+".png' style='position: absolute; top: 8px; right: 8px;' watermark>")
|
||||
}
|
||||
$(".content #pic").css({boxShadow: "1px 1px 10px 3px #d0d0d0", width: "300px", height: "400px", lineHeight: "400px"})
|
||||
new Viewer(document.getElementById("show-for-"+isPadOrPhone), {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
//------------信息
|
||||
if (json_data.gz) {
|
||||
var gzs = json_data.gz.split("|")
|
||||
for (var gi = 0; gi < gzs.length; gi++) {
|
||||
if (gi != 0) $(".content #gz .text").append("<br>")
|
||||
$(".content #gz .text").append(gzs[gi])
|
||||
}
|
||||
} else {
|
||||
$(".content #gz").css("display", "none")
|
||||
}
|
||||
$(".content #yph .text").text(json_data.xh)
|
||||
$(".content #kh .text").text(json_data.kh)
|
||||
// 2021.07.01:某些条件隐藏价格
|
||||
if (json_data.is_gg == 'y' || (json_data.is_xd_clothes == "y" && json_data.child_sizegroup_id === json_data.size_group_id)) {
|
||||
$("#content #price").hide()
|
||||
} else {
|
||||
$("#content #price .text").text(json_data.price.replace(/<br>/g, ';').replace(/;\s*$/, ""))
|
||||
}
|
||||
$(".content #ksm .text").text(json_data.ksm)
|
||||
for (var i = 0; i < json_data.zds.length; i++) {
|
||||
var zd = json_data.zds[i]
|
||||
if (isPadOrPhone == "pad") {
|
||||
$(".content #zds").append("<div id='zd-"+zd.no+"' class='layui-row layui-col-space10'><span class='title layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4'>"+zd.title+"</span><span class='text layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8'>"+zd.value+"</span></div>")
|
||||
} else if (isPadOrPhone == "phone") {
|
||||
$(".content #zds").append("<div id='zd-"+zd.no+"' class='layui-row layui-col-space10'><span class='title layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6'>"+zd.title+"</span><span class='text layui-col-xs6 layui-col-sm6 layui-col-md6 layui-col-lg6'>"+zd.value+"</span></div>")
|
||||
}
|
||||
}
|
||||
$(".content.-for-"+isPadOrPhone+" #remark .text").text(json_data.dkremark)
|
||||
//------------星级
|
||||
$(".content.-for-"+isPadOrPhone+" #xj #xj-item").html('<div id="div_pj_'+json_data.khid+'_icon_big">'+get_pj_icon(json_data.xj,json_data.khid,"big","y")+'</div>')
|
||||
//------------文字评价
|
||||
$(".content.-for-"+isPadOrPhone+" #pjwz").append('<div id="remark_'+json_data.khid+'" class="div_input_remark"><textarea id="input_remark_'+json_data.khid+'" placeholder="请输入评价文字" autocomplete="off" class="layui-input" style="width: 80%; min-height: 100px; margin: auto; padding: 10px;" onfocus="pj_remark_focus('+json_data.khid+')" onblur="pj_remark_blur('+json_data.khid+',\''+json_data.pjwz+'\')">'+json_data.pjwz+'</textarea></div>')
|
||||
$(".content.-for-"+isPadOrPhone+" #pjwz").append('<div id="div_save_remark_'+json_data.khid+'" class="div_save_remark" style="display:none;"><a class="layui-btn layui-btn-sm button_save_remark" id="button_save_remark_'+json_data.khid+'" onclick="save_pj_remark('+json_data.khid+',\''+json_data.pjwz+'\')" style="background-color: #F04122;">保存文字</botton></div>')
|
||||
$(".content.-for-"+isPadOrPhone+" #pjwz").append('<div class="div_button_del_pj" style="'+(json_data.xj > 0 || json_data.pjwz != "" ? "block" : "display:none; ")+'padding: 4px;" id="div_button_del_pj_'+json_data.khid+'"><a id="button_del_pj_'+json_data.khid+'" class="layui-btn layui-btn-sm button_del_pj layui-btn-primary" onclick="del_pj('+json_data.khid+')" style="border-color: #F04122; color: #F04122;">删除评价</botton></div>')
|
||||
//------------ds
|
||||
if (json_data.ds_body && json_data.ds_body.length > 0) {
|
||||
var ds_elem = "<table border='1' style='width: 100%; border: solid 1px #eee;'>"
|
||||
ds_elem += "<tr>"
|
||||
for (var i = 0; i < json_data.ds_header.length; i++) {
|
||||
ds_elem += "<td>"+json_data.ds_header[i].v+"</td>"
|
||||
}
|
||||
ds_elem += "</tr>"
|
||||
for (var j = 0; j < json_data.ds_body.length; j++) {
|
||||
var ds_v = json_data.ds_body[j].v
|
||||
ds_elem += "<tr>"
|
||||
for (var k = 0; k < ds_v.length; k++) {
|
||||
ds_elem += "<td>"+ds_v[k].v+"</td>"
|
||||
}
|
||||
ds_elem += "</tr>"
|
||||
}
|
||||
ds_elem += "</table>"
|
||||
$(".content #ds").append(ds_elem)
|
||||
}
|
||||
//------------订单详细,尺码表
|
||||
//--------表头
|
||||
var dd_header = "<tr class='dd-header'>"
|
||||
,col_count = 0 // 列数
|
||||
,cm_front_count = 0 // 尺码前格数
|
||||
dd_header += "<td dd-w='3'>颜色</td>"
|
||||
col_count += 3
|
||||
cm_front_count++
|
||||
if (json_data.is_ggk != "n") {
|
||||
dd_header += "<td dd-w='1'>规格</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
if (json_data.is_ggk == "y") {
|
||||
for (var i = 0; i < json_data.arr_gg_zd.length; i++) {
|
||||
dd_header += "<td dd-w='1'>"+json_data.arr_gg_zd[i].title+"</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
if (json_data.show_gg_zxs == "y") {
|
||||
dd_header += "<td dd-w='1'>"+json_data.translate_dhbs+"</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
}
|
||||
} else if (json_data.size_group_id == json_data.bx_sizegroup_id) {
|
||||
dd_header += "<td dd-w='1'>杯型</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
} else if (json_data.size_group_id == json_data.child_sizegroup_id) {
|
||||
dd_header += "<td dd-w='1'>款型</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
for (var i = 0; i < json_data.cmz.length; i++) {
|
||||
dd_header += "<td dd-w='1'>"+json_data.cmz[i].title+"</td>"
|
||||
col_count++
|
||||
}
|
||||
dd_header += "<td dd-w='1'>小计</td>"
|
||||
col_count++
|
||||
dd_header += "<td dd-w='1'></td>" // 下单按钮
|
||||
col_count++
|
||||
dd_header += "</tr>"
|
||||
$("#dds").append(dd_header)
|
||||
$("#dds .dd-header td").each(function() {
|
||||
$(this).width(100/col_count*parseInt($(this).attr("dd-w"))+"%") // 调整格宽
|
||||
})
|
||||
//--------表身
|
||||
var same_color_flag = 0 // 同色行标志,>0:同色
|
||||
,dd_col_total = []
|
||||
for (var i = 0; i < json_data.dds.length; i++) {
|
||||
var dd = json_data.dds[i] // 行数据
|
||||
,dd_body_row = "<tr class='dd-row'>" // 行文本
|
||||
,cm_number = 0 // 尺码位数,用于dd_col_total定位
|
||||
if (same_color_flag == 0) $("#dds").append("<tr><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 分割线
|
||||
for (var j = 0; j < dd.dt.length; j++) {
|
||||
var dtl = dd.dt[j]
|
||||
switch(dtl.no) {
|
||||
case "1": // 颜色格,规格等
|
||||
if (j==0) { // 颜色格
|
||||
if (same_color_flag == 0) {
|
||||
dd_body_row += "<td rowspan='"+(parseInt(dd.ggs) ? parseInt(dd.ggs) : 1)+"'>"+(dd.ka != "y" ? "<span id='"+dtl.id+"' style='display: inline-block;'>"+dtl.value+"</span>" : "<span id='"+dtl.id+"' style='display: inline-block; color: #F04122;'><s class='del-color'>"+dtl.value+"</s></span>")+(dd.link_ds==""?"":" <a href='toPage("+dd.link_ds+")' style='display: inline-block;'>进入搭配款</a>")+"</td>"
|
||||
same_color_flag = dd.ggs - 1 >=0 ? dd.ggs - 1 : 0
|
||||
} else {
|
||||
same_color_flag--
|
||||
break
|
||||
}
|
||||
} else { // 规格等其他
|
||||
if (cm_front_count <= j && j < json_data.cmz.length + cm_front_count) { // 如果 j 在尺码范围内,则
|
||||
dd_body_row += "<td><span id='"+dtl.id+"'>"+dtl.value+"</span></td>"
|
||||
cm_number++
|
||||
}
|
||||
else {
|
||||
dd_body_row += "<td><span id='"+dtl.id+"'>"+dtl.value+"</span></td>"
|
||||
}
|
||||
}
|
||||
break
|
||||
case "2": // 手数格
|
||||
// dd_body_row += "<td class='pct-ckinput-wrapper'><input type='number' id='"+dtl.id+"' name='"+dtl.id+"' class='dd-sh layui-input' style='text-align: center;' pct-change='changeSh(self)' pct-save='saveOrder()'></td>"
|
||||
break
|
||||
case "3": // 尺码格
|
||||
dd_body_row += "<td>"+dtl.value+"</td>"
|
||||
dd_col_total[cm_number] = dd_col_total[cm_number] ? (dd_col_total[cm_number] + parseInt(dtl.value ? dtl.value : "0")) : parseInt(dtl.value ? dtl.value : "0")
|
||||
cm_number++
|
||||
break
|
||||
case "4": // 小计格
|
||||
dd_body_row += "<td><span id='"+dtl.id+"' class='dd-row-total'>"+dtl.value+"</span></td>"
|
||||
break
|
||||
case "100": // 下单格
|
||||
dd_body_row += "<td><a href='javascript:openQjXd(\""+dtl.khid+"\",\""+dtl.color+"\",\""+dtl.bx+"\")' class='layui-btn' style='background-color: #F04122; margin-right: 10px;'>下单</a></td>"
|
||||
break
|
||||
}
|
||||
}
|
||||
dd_body_row += "</tr>"
|
||||
$("#dds").append(dd_body_row)
|
||||
}
|
||||
$('.del-color').on('click', function(){ // 设定删除款tip
|
||||
layer.tips('已删除', this); //在元素的事件回调体中,follow直接赋予this即可
|
||||
})
|
||||
//--------表尾
|
||||
$("#dds").append("<tr><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 分割线
|
||||
var dd_all_total = 0
|
||||
dd_footer = "<tr class='dd-footer'><td colspan='"+cm_front_count+"' style='text-align: right;'>合计</td>"
|
||||
for (var k = 0; k < json_data.cmz.length; k++) {
|
||||
var col_total = dd_col_total[k] ? dd_col_total[k] : 0
|
||||
dd_footer += "<td><span class='dd-col-total'>"+col_total+"</span></td>"
|
||||
dd_all_total += col_total
|
||||
}
|
||||
dd_footer += "<td><span class='dd-all-total'>"+dd_all_total+"</span></td></tr>"
|
||||
$("#dds").append(dd_footer)
|
||||
const min_width = Math.min(window.innerWidth, window.innerHeight) // 横竖屏转换时的最小宽度
|
||||
//------------细节图
|
||||
var xj_max_h = 0, xj_max_w = 0
|
||||
if (json_data.xjs.length == 0) $(".xjs-belonging").css("display", "none")
|
||||
else {
|
||||
for (var i = 0; i < json_data.xjs.length; i++) {
|
||||
var xj = json_data.xjs[i]
|
||||
,html = ""
|
||||
html += "<div class='-outer' style='display: inline-block; width: 20%; float: left; margin: 10px 0;><div class='-inner' style='border: 1px solid #ccc; width: "+(parseInt(xj.pic_w ? xj.pic_w : "0")+10)+"px; display: block; margin: auto; padding: 0 5px;'>"
|
||||
html += "<div style='height: 130px; line-height: 130px;'><img src='"+xj.pic+"' style='width: "+xj.pic_w+"px; height: "+xj.pic_h+"px; margin: 5px 0;' watermark></div>"
|
||||
html += "<div class='-title' style='word-wrap: break-word;'>"+xj.title+"</div>"
|
||||
html += "</div></div>"
|
||||
var elem = $(html)
|
||||
$("#xjs").append(elem)
|
||||
var xj_h = 130 + elem.find(".-title").height()
|
||||
// var xj_h = parseInt(xj.pic_h ? xj.pic_h : '0') + elem.find(".-title").height() + 10
|
||||
,xj_w = parseInt(xj.pic_w ? xj.pic_w : "0") + 20
|
||||
xj_max_h = xj_max_h < xj_h ? xj_h : xj_max_h
|
||||
xj_max_w = xj_max_w < xj_w ? xj_w : xj_max_w
|
||||
}
|
||||
|
||||
var xj_width_percentage = "" // outer宽度占比
|
||||
if (xj_max_w * 6 < min_width) xj_width_percentage = "16.66%"
|
||||
else if (xj_max_w * 5 < min_width) xj_width_percentage = "20%"
|
||||
else if (xj_max_w * 4 < min_width) xj_width_percentage = "25%"
|
||||
else xj_width_percentage = "33%"
|
||||
$("#xjs .-outer").width(xj_width_percentage)
|
||||
|
||||
$("#xjs .-outer").height(xj_max_h)
|
||||
new Viewer(document.getElementById("xjs"), {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//------------相关搭配款
|
||||
var dpk_max_h = 0, dpk_max_w = 0
|
||||
if (json_data.dpks.length == 0) $(".dpks-belonging").css("display", "none")
|
||||
else {
|
||||
for (var i = 0; i < json_data.dpks.length; i++) {
|
||||
var dpk = json_data.dpks[i]
|
||||
,html = ""
|
||||
html += "<div class='-outer' style='display: inline-block; width: 25%; float: left; margin: 10px 0;'><a class='-inner' href='javascript: openThePage(\""+json_data.face+"\", \"dk\", \"khid\", "+dpk.id+");' style='border: 1px solid #ccc; width: "+(parseInt(dpk.pic_w ? dpk.pic_w : "0")+10)+"px; display: block; margin: auto; padding: 0 5px;'>"
|
||||
html += "<div style='height: 130px; line-height: 130px;'><img src='"+dpk.pic+"' style='width: "+dpk.pic_w+"px; height: "+dpk.pic_h+"px; margin: 5px 0;' watermark></div>"
|
||||
html += "<div class='-title' style='word-wrap: break-word;'>"+dpk.title+"</div>"
|
||||
html += "</a></div>"
|
||||
var elem = $(html)
|
||||
$("#dpks").append(elem)
|
||||
var dpk_h = 130 + elem.find(".-title").height()
|
||||
// var dpk_h = parseInt(dpk.pic_h ? dpk.pic_h : '0') + elem.find(".-title").height() + 10
|
||||
,dpk_w = parseInt(dpk.pic_w ? dpk.pic_w : "0") + 20
|
||||
dpk_max_h = dpk_max_h < dpk_h ? dpk_h : dpk_max_h
|
||||
dpk_max_w = dpk_max_w < dpk_w ? dpk_w : dpk_max_w
|
||||
}
|
||||
|
||||
var dpk_width_percentage = "" // outer宽度占比
|
||||
if (dpk_max_w * 6 < min_width) dpk_width_percentage = "16.66%"
|
||||
else if (dpk_max_w * 5 < min_width) dpk_width_percentage = "20%"
|
||||
else if (dpk_max_w * 4 < min_width) dpk_width_percentage = "25%"
|
||||
else dpk_width_percentage = "33%"
|
||||
$("#dpk .-outer").width(dpk_width_percentage)
|
||||
|
||||
$("#dpks .-outer").height(dpk_max_h)
|
||||
}
|
||||
//------------相关搭配
|
||||
var dp_max_h = 0, dp_max_w = 0
|
||||
if (json_data.dps.length == 0) $(".dps-belonging").css("display", "none")
|
||||
else {
|
||||
for (var i = 0; i < json_data.dps.length; i++) {
|
||||
var dp = json_data.dps[i]
|
||||
,html = ""
|
||||
html += "<div class='-outer' style='display: inline-block; width: 25%; float: left; margin: 10px 0;'><a class='-inner' href='javascript: openThePage(\""+json_data.face+"\", \"dp\", \"zsh\", "+dp.zsh+");' style='border: 1px solid #ccc; width: "+(parseInt(dp.pic_w ? dp.pic_w : "0")+10)+"px; display: block; margin: auto; padding: 0 5px;'>"
|
||||
html += "<div style='height: 130px; line-height: 130px;'><img src='"+dp.pic+"' style='width: "+dp.pic_w+"px; height: "+dp.pic_h+"px; margin: 5px 0;' watermark></div>"
|
||||
html += "<div class='-title' style='word-wrap: break-word;'>"+dp.title+"</div>"
|
||||
html += "</a></div>"
|
||||
var elem = $(html)
|
||||
$("#dps").append(elem)
|
||||
var dp_h = 130 + elem.find(".-title").height()
|
||||
// var dp_h = parseInt(dp.pic_h ? dp.pic_h : '0') + elem.find(".-title").height() + 10
|
||||
,dp_w = parseInt(dp.pic_w ? dp.pic_w : "0") + 20
|
||||
dp_max_h = dp_max_h < dp_h ? dp_h : dp_max_h
|
||||
dp_max_w = dp_max_w < dp_w ? dp_w : dp_max_w
|
||||
}
|
||||
var dp_width_percentage = "" // outer宽度占比
|
||||
if (dp_max_w * 6 < min_width) dp_width_percentage = "16.66%"
|
||||
else if (dp_max_w * 5 < min_width) dp_width_percentage = "20%"
|
||||
else if (dp_max_w * 4 < min_width) dp_width_percentage = "25%"
|
||||
else dp_width_percentage = "33.33%"
|
||||
$("#dps .-outer").width(dp_width_percentage)
|
||||
|
||||
$("#dps .-outer").height(dp_max_h)
|
||||
}
|
||||
//------------相关陈列
|
||||
var cl_max_h = 0, cl_max_w = 0
|
||||
if (json_data.cls.length == 0) $(".cls-belonging").css("display", "none")
|
||||
else {
|
||||
for (var i = 0; i < json_data.cls.length; i++) {
|
||||
var cl = json_data.cls[i]
|
||||
,html = ""
|
||||
html += "<div class='-outer' style='display: inline-block; width: 25%; float: left; margin: 10px 0;'><a class='-inner' href='javascript: openThePage(\"\", \"cl\", \"zsh\", "+cl.zsh+");' style='border: 1px solid #ccc; width: "+(parseInt(cl.pic_w ? cl.pic_w : "0")+10)+"px; display: block; margin: auto; padding: 0 5px;'>"
|
||||
html += "<div style='height: 130px; line-height: 130px;'><img src='"+cl.pic+"' style='width: "+cl.pic_w+"px; height: "+cl.pic_h+"px; margin: 5px 0;' watermark></div>"
|
||||
html += "<div class='-title' style='word-wrap: break-word;'>"+cl.title+"</div>"
|
||||
html += "</a></div>"
|
||||
var elem = $(html)
|
||||
$("#cls").append(elem)
|
||||
var cl_h = 130 + elem.find(".-title").height()
|
||||
// var cl_h = parseInt(cl.pic_h ? cl.pic_h : '0') + elem.find(".-title").height() + 10
|
||||
,cl_w = parseInt(cl.pic_w ? cl.pic_w : "0") + 20
|
||||
cl_max_h = Math.max(cl.pic_h, cl_h)
|
||||
cl_max_w = cl_max_w < cl_w ? cl_w : cl_max_w
|
||||
}
|
||||
|
||||
var cl_width_percentage = "" // outer宽度占比
|
||||
if (cl_max_w * 6 < min_width) cl_width_percentage = "16.66%"
|
||||
else if (cl_max_w * 5 < min_width) cl_width_percentage = "20%"
|
||||
else if (cl_max_w * 4 < min_width) cl_width_percentage = "25%"
|
||||
else cl_width_percentage = "33.33%"
|
||||
$("#cls .-outer").width(cl_width_percentage)
|
||||
$("#cls .-outer").height(cl_max_h)
|
||||
}
|
||||
//------------相关橱窗
|
||||
var cc_max_h = 0, cc_max_w = 0
|
||||
if (json_data.ccs.length == 0) $(".ccs-belonging").css("display", "none")
|
||||
else {
|
||||
for (var i = 0; i < json_data.ccs.length; i++) {
|
||||
var cc = json_data.ccs[i]
|
||||
,html = ""
|
||||
html += "<div class='-outer' style='display: inline-block; width: 25%; float: left; margin: 10px 0;'><a class='-inner' href='javascript: openThePage(\"\", \"cc\", \"zsh\", "+cc.zsh+");' style='border: 1px solid #ccc; width: "+(parseInt(cc.pic_w ? cc.pic_w : "0")+10)+"px; display: block; margin: auto; padding: 0 5px;'>"
|
||||
html += "<div style='height: 130px; line-height: 130px;'><img src='"+cc.pic+"' style='width: "+cc.pic_w+"px; height: "+cc.pic_h+"px; margin: 5px 0;' watermark></div>"
|
||||
html += "<div class='-title' style='word-wrap: break-word;'>"+cc.title+"</div>"
|
||||
html += "</a></div>"
|
||||
var elem = $(html)
|
||||
$("#ccs").append(elem)
|
||||
var cc_h = 130 + elem.find(".-title").height()
|
||||
// var cc_h = parseInt(cc.pic_h ? cc.pic_h : '0') + elem.find(".-title").height() + 10
|
||||
,cc_w = parseInt(cc.pic_w ? cc.pic_w : "0") + 20
|
||||
cc_max_h = cc_max_h < cc_h ? cc_h : cc_max_h
|
||||
cc_max_w = cc_max_w < cc_w ? cc_w : cc_max_w
|
||||
}
|
||||
|
||||
var cc_width_percentage = "" // outer宽度占比
|
||||
if (cc_max_w * 6 < min_width) cc_width_percentage = "16.66%"
|
||||
else if (cc_max_w * 5 < min_width) cc_width_percentage = "20%"
|
||||
else if (cc_max_w * 4 < min_width) cc_width_percentage = "25%"
|
||||
else cc_width_percentage = "33.33%"
|
||||
$("#ccs .-outer").width(cc_width_percentage)
|
||||
|
||||
$("#ccs .-outer").height(cc_max_h)
|
||||
}
|
||||
|
||||
USetWatermark({
|
||||
is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
})
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
}
|
||||
);
|
||||
|
||||
// 选择图片展示
|
||||
$(document).on("click", "#pic .-choose .-item", function(index) {
|
||||
$("#pic .-choose .-item").css("border-color", "#9B9B9B")
|
||||
$(this).css("border-color", "#F04122")
|
||||
$("#pic .-show img").css("display", "none")
|
||||
var elem = $("#pic .-show img:nth-child("+$(this).attr("index")+")")
|
||||
if (elem[0].nodeName === 'VIDEO' && !elem.attr('src')) elem.attr('src', dk_data.vurl)
|
||||
elem.show(500)
|
||||
})
|
||||
|
||||
// 搜索,款号,圆牌号
|
||||
$("#btn-search").click(function() {
|
||||
if (!$("#s-title input").val().replace(/ /g, "")) return true
|
||||
var url="./?_m=dk&_a=single_qj&s_title="+$("#s-title input").val()
|
||||
console.log(url)
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(res_jsondata)
|
||||
if (res_jsondata.code == 100) {
|
||||
location.href = "dk_single_qj.htm?khid="+res_jsondata.khid
|
||||
} else if (res_jsondata.code == 101) {
|
||||
var content_html = "<div style='padding: 15px;'>找到以下符合条件的多项,请选择:</div>"
|
||||
for (var i = 0; i < res_jsondata.msg.length; i++) {
|
||||
var msgl = res_jsondata.msg[i]
|
||||
content_html += '<a href="dk_single_qj?khid='+msgl.khid+'" style="display: block; float: left; width: 60px; padding: 10px; color: blue; text-decoration: underline;">'+msgl.title+'</a>'
|
||||
}
|
||||
layer.open({
|
||||
type: 1
|
||||
,title: false //不显示标题栏
|
||||
,closeBtn: true
|
||||
,area: '300px;'
|
||||
,shade: 0.8
|
||||
,id: 'dp-location' //设定一个id,防止重复弹出
|
||||
// ,btn: ['火速围观', '残忍拒绝']
|
||||
,btnAlign: 'c'
|
||||
,moveType: 1 //拖拽模式,0或者1
|
||||
,content: content_html
|
||||
})
|
||||
} else {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
// 屏幕旋转时重置部分元素的方位与尺寸
|
||||
$(window).resize(function() {
|
||||
$("#layui-layer-dpm-show").css({
|
||||
top: ((window.innerHeight - 250) / 2)+'px',
|
||||
left: (window.innerWidth*0.05)+'px',
|
||||
width: (window.innerWidth*0.9)+'px'
|
||||
})
|
||||
})
|
||||
var window_name = window.name
|
||||
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
// 将iframe的高度同步为其父元素.layui-layer-iframe的高度
|
||||
$(this).find("[name="+window_name+"]").height($(this).height())
|
||||
})
|
||||
})
|
||||
function openQjXd(khid, color, bx) {
|
||||
layui.use('layer', function(){
|
||||
var layer = parent.layer;
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
name: 'dk_single_qj_xd',
|
||||
id: 'dk_single_qj_xd',
|
||||
content: "dk_single_qj_xd.htm?khid="+khid+"&color="+color+"&bx="+bx+"&s_dpdj=_ALL_",
|
||||
offset: 'b',
|
||||
closeBtn: 0,
|
||||
anim: 2
|
||||
})
|
||||
layer.full(index);
|
||||
})
|
||||
}
|
||||
function update_yd(khid) {
|
||||
location.reload()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,329 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search{width:100%;text-align:left;background-color:#ffffff;height:59px;line-height:59px;}
|
||||
.kh_list-container{background:#fff;border:1px solid #e5e5e5;padding-bottom:0px;border-radius:8px;-moz-border-radius:8px;-webkit-border-radius:8px;overflow:hidden;}
|
||||
.kh_list-container:hover{border:1px solid #e8e8e8;}
|
||||
.kh_list-container .img{height:250px;line-height:250px;width:188px;z-index:1;overflow:hidden;cursor:pointer;}
|
||||
.kh_info{height:40px;line-height:40px;background-color:#f5f5f5;text-align:center;color:#595959;font-size:16px;font-weight:bold;}
|
||||
.kh_info .zsh{}
|
||||
.kh_info .dph{}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!--搜索-->
|
||||
<form class="layui-form" name="form1_search" id="form1_search" method="get" action="dp.htm">
|
||||
<div class="search">
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
<span id="select_single"></span>
|
||||
<div class="layui-input-inline" style="width:120px;"><input type="text" id="s_keyword" name="s_keyword" placeholder="款号/圆牌号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<div class="layui-input-inline" style="width:80px;" id="div_dph"><input type="text" id="s_title" name="s_title" placeholder="搭配号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<div class="layui-input-inline" style="width:10px;"></div>
|
||||
</div>
|
||||
<!--隐藏的提交按钮-->
|
||||
<div style="position:absolute;top:0px;left:0px;width:0px;height:0px;">
|
||||
<button lay-submit lay-filter="form1_submit" id="form1_submit" class="layui-btn layui-btn-submit" style="width:0px;height:0px;"></button>
|
||||
</div>
|
||||
</form>
|
||||
<!--图片列表-->
|
||||
<div class="layui-row u-list" id="edt_kh_content"></div>
|
||||
<script>
|
||||
//更新已订数据
|
||||
function update_yd(){
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
//获取预设数据
|
||||
var url="./?_m=dk&_a=get_wcl&khid=";
|
||||
$.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);
|
||||
},
|
||||
error: function () {
|
||||
//
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
//自由搭配打开
|
||||
function zydp_single(zsh){
|
||||
layui.use('layer', function(){
|
||||
var url1="zydp.htm";
|
||||
var layer = parent.layer;
|
||||
index_zydp = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: url1+'?zsh='+zsh,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2
|
||||
});
|
||||
layer.full(index_zydp);
|
||||
});
|
||||
}
|
||||
//是否手机端
|
||||
var is_mobile="n";
|
||||
var index_dk_single="";
|
||||
//搭配详情
|
||||
function dp_single(zsh){
|
||||
layui.use('layer', function(){
|
||||
var layer = parent.layer;
|
||||
index_dk_single = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: 'dp_single.htm?zsh='+zsh,
|
||||
offset: 'b',
|
||||
closeBtn:0,
|
||||
anim: 2,
|
||||
});
|
||||
layer.full(index_dk_single);
|
||||
});
|
||||
}
|
||||
function zydp_btn_click(zsh,thistype){
|
||||
layui.use('layer', function(){
|
||||
var $ = layui.$
|
||||
var layer = parent.layer;
|
||||
if(thistype=="copy"){
|
||||
layer.confirm("确定复制该搭配吗?", {btn: ['确定', '取消'], title: "提示"}, function () {
|
||||
url1="./?_m=zydp&_a=copy&zsh="+zsh;
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'post',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
if(res.cate=="copyok"){
|
||||
parent.layui.layer.msg("复制成功!");
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
parent.layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
}else if(thistype=="del"){
|
||||
layer.confirm("确定删除该搭配吗?", {btn: ['确定', '取消'], title: "提示"}, function () {
|
||||
url1="./?_m=zydp&_a=del&zsh="+zsh;
|
||||
$.ajax(
|
||||
{
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'post',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
if(res.cate=="delok"){
|
||||
parent.layui.layer.msg("删除成功!");
|
||||
parent.frames["layadmin-iframe"].location.reload();
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
parent.layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}else if(thistype=="edit"){
|
||||
zydp_single(zsh);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
//取得瀑布流单款html
|
||||
function get_list_html(data1,zydp,content_set){
|
||||
var html1='';
|
||||
html1+='<div class="u-list-item layui-col-lg2 layui-col-md3 layui-col-sm4 layui-col-xs6"><div class="kh_list-container" id="kh_'+data1.id+'">';
|
||||
//---------------图片
|
||||
html1+='<div class="img" onclick="dp_single('+data1.zsh+');" style="background-color:'+content_set+';"><img src="'+data1.pic+'" width="'+data1.pic_w+'" height="'+data1.pic_h+'" watermark></div>';
|
||||
//kh_info
|
||||
html1+='<div class="kh_info">';
|
||||
//---------------展示号
|
||||
html1+='<span class="zsh">'+data1.zsh+' . </span>';
|
||||
//---------------搭配号
|
||||
html1+='<span class="dph">'+data1.title+'</span>';
|
||||
if(zydp=="y"){
|
||||
if(data1.is_my_dp=="n"){
|
||||
html1+='<span><a href="javascript:void(0);" class="layui-btn layui-btn-normal layui-btn-sm" onclick="zydp_btn_click(\''+data1.zsh+'\',\'copy\')">复制</a></span>';
|
||||
}else{
|
||||
html1+='<span><a href="javascript:void(0);" class="layui-btn layui-btn-normal layui-btn-sm" onclick="zydp_btn_click(\''+data1.zsh+'\',\'edit\')">修改</a> </span>';
|
||||
html1+='<span><a href="javascript:void(0);" class="layui-btn layui-btn-danger layui-btn-sm" onclick="zydp_btn_click(\''+data1.zsh+'\',\'del\')">删除</a></span>';
|
||||
}
|
||||
}
|
||||
html1+='</div>';
|
||||
//----kh_info
|
||||
html1+='</div></div>';
|
||||
return html1;
|
||||
}
|
||||
//
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','flow'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var page=1;
|
||||
//流加载
|
||||
var flow = layui.flow;
|
||||
//选项数组
|
||||
flow.load({
|
||||
elem: '#edt_kh_content'
|
||||
,scrollElem:'#edt_kh_content'
|
||||
,end:'<div style=\'width:100%;height:30px;line-height:30px;clear:both;\'>加载完成了</div>'
|
||||
,done: function(page, next){
|
||||
var lis = [];
|
||||
var url1='./?_m=dp&page='+page+query_str;
|
||||
//alert(url1);
|
||||
$.get(url1,function(res){
|
||||
json_data=$.parseJSON(res);
|
||||
|
||||
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{
|
||||
//
|
||||
var data1=json_data.select_dz;
|
||||
//定制选项
|
||||
var html1="";
|
||||
for(var i=0;i<data1.length;i++){
|
||||
if(data1[i].no=="s_type"){
|
||||
if(json_data.sys_zydp=="y"){
|
||||
html1+='<div class="layui-input-inline" style="width:100px;"><select name="'+data1[i].no+'" lay-filter="select_single"><option value="">-'+data1[i].title+'-</option>';
|
||||
var op=data1[i].op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==data1[i].value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
}else{
|
||||
html1+='<div class="layui-input-inline" style="width:100px;"><select name="'+data1[i].no+'" lay-filter="select_single"><option value="">-'+data1[i].title+'-</option>';
|
||||
var op=data1[i].op;
|
||||
for(var j=0;j<op.length;j++){
|
||||
html1+='<option value="'+op[j].no+'"';
|
||||
if(op[j].no==data1[i].value)
|
||||
html1+=' selected';
|
||||
html1+='>'+op[j].title+'</option>';
|
||||
}
|
||||
html1+='</select></div> ';
|
||||
}
|
||||
|
||||
}
|
||||
$("#select_single").html(html1);
|
||||
//圆牌号或款号
|
||||
var s_keyword="";
|
||||
if(json_data.s_keyword)
|
||||
s_keyword=json_data.s_keyword;
|
||||
$("#s_keyword").val(s_keyword);
|
||||
//搭配号
|
||||
var s_title="";
|
||||
if(json_data.s_title)
|
||||
s_title=json_data.s_title;
|
||||
$("#s_title").val(s_title);
|
||||
|
||||
//自由搭配
|
||||
if(json_data.sys_zydp=="y" && json_data.page <= 1){
|
||||
var html1='';
|
||||
html1+='<div class="layui-input-inline zydp-wrapper"><a href="javascript:void(0);" onclick="zydp_single(0)"><img src="images/button_zydp.png" style="width:80px;height:30px;" border="0" watermark></a></div>';
|
||||
var elem = $(html1)
|
||||
USetWatermark({
|
||||
el: elem,
|
||||
is_sy: json_data.is_sy,
|
||||
text: json_data.username,
|
||||
mode: "outer"
|
||||
})
|
||||
$("#div_dph").after(elem[0].outerHTML);
|
||||
}
|
||||
|
||||
//加载图片列表
|
||||
var data=json_data.content_list;
|
||||
var html1='';
|
||||
for(var i=0;i<data.length;i++){
|
||||
html1=get_list_html(data[i],json_data.sys_zydp,json_data.content_set);
|
||||
var elem = $(html1)
|
||||
USetWatermark({
|
||||
el: elem,
|
||||
is_sy: json_data.is_sy,
|
||||
text: json_data.username,
|
||||
mode: "outer"
|
||||
})
|
||||
lis.push(elem[0].outerHTML)
|
||||
}
|
||||
next(lis.join(''), page<json_data.total_page);
|
||||
// 限制图片宽度防止超出父元素尺寸
|
||||
$(".kh_list-container .img").css("max-width", $(".kh_list-container").width())
|
||||
$(".kh_list-container .img img").css("max-width", $(".kh_list-container").width())
|
||||
//
|
||||
total_page=json_data.total_page;
|
||||
form.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//
|
||||
form.on('select(select_single)', function(data){
|
||||
$("#form1_submit").click();
|
||||
});
|
||||
//提交
|
||||
form.on("submit(form1_submit)",function(data){
|
||||
window.focus();
|
||||
return true;
|
||||
});
|
||||
//改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作)
|
||||
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height()-60)
|
||||
//监听屏幕旋转
|
||||
// resize和orientationchange的不同:
|
||||
// resize: 监听尺寸变化,orientationchange:监听移动端横竖屏切换
|
||||
// orientationchange:宽高为切换前宽高,需延时才能获取切换后的宽高
|
||||
$(window).on("orientationchange", function() {
|
||||
if(index_dk_single)
|
||||
parent.layer.full(index_dk_single)
|
||||
setTimeout(function() {
|
||||
$("#edt_kh_content").height($("#LAY_app_body", parent.document).height() - 60)
|
||||
}, 100)
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,544 @@
|
||||
<!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">
|
||||
<style>
|
||||
.pcki-page {overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch;}
|
||||
#content #info .title{color: #9b9b9b; text-align: right;}
|
||||
#content #info .text{font-weight: bold; text-align: left;}
|
||||
#dks td>div {padding: 1px;}
|
||||
.kh_list-container {position: relative;}
|
||||
.kh_list-container .kh_hide{display:none;min-width:100%;position:absolute;right:0px;bottom:23px;background:#f5f5f5;filter:alpha(Opacity=90);-moz-opacity:0.9;opacity: 0.9;}
|
||||
.kh_list-container .kh_hide table {margin: auto;}
|
||||
#dks .-body input { max-width: 80px; margin: auto;}
|
||||
#dks .-body .layui-input { padding-left: 0px;}
|
||||
</style>
|
||||
<!-- 引入 -->
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="js/jquery.min.js"></script>
|
||||
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- universal -->
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<!-- p_custom_keyboard js -->
|
||||
<link rel="stylesheet" href="js/p_custom_keyboard/p_custom_keyboard.css">
|
||||
<script src="js/p_custom_keyboard/p_custom_keyboard.js"></script>
|
||||
<!-- viewer js -->
|
||||
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
||||
<script src="js/viewer/viewer.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="pcki-page">
|
||||
<!-- 顶部标题栏 -->
|
||||
<div class="state_bar">
|
||||
<div class="text_title">搭配详情</div>
|
||||
<div class="btn_close" onclick="close_this_frame();"><img src="images/close.png" width=30 height=30 border=0></div>
|
||||
</div>
|
||||
<!--头部 上下款 搜索-->
|
||||
<div class="header">
|
||||
<a id="btn-prev" class="-btn-into" style="position: absolute; top: 0; left: 20px;"><i class="layui-icon layui-icon-left"></i>上一组</a>
|
||||
<div id="s-title" class="layui-input-inline" style="width: 20%; margin-right: 10px; max-width: 150px; min-width: 100px;"><input type="text" name="" placeholder="搭配号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<a id="btn-search" class="layui-btn layui-input-inline" style="border-radius:10px 10px 10px 10px; background-color: #F04122; padding: 0 10px;">查询</a>
|
||||
<a id="btn-next" class="-btn-into" style="position: absolute; top: 0; right: 20px;">下一组<i class="layui-icon layui-icon-right"></i></a>
|
||||
</div>
|
||||
<!-- 信息层 -->
|
||||
<div id="content">
|
||||
<div class="" style="margin-top: 20px; margin-bottom: 20px;">
|
||||
<div id="pic" style="box-shadow: 1px 1px 10px 3px #d0d0d0; width: 300px; height: 400px; line-height: 400px;"></div>
|
||||
</div>
|
||||
<div style="margin: 5px 0;">
|
||||
<div id="remark"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="layui-bg-gray">
|
||||
<form class="layui-form">
|
||||
<!-- 单款详细 -->
|
||||
<input id="zsh" name="zsh" style="display: none;">
|
||||
<input id="uid" name="uid" style="display: none;">
|
||||
<input id="ks_bx_num" name="ks_bx_num" style="display: none;">
|
||||
<table id="dks" class="pck-input-wrapper" style="width: 96%; margin: auto;"></table>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 保存 -->
|
||||
<div id="dk-opt-box" style="text-align: right;">
|
||||
<a id="dk-save" lay-submit lay-filter="dk-save" class="layui-btn" style="background-color: #F04122; margin-right: 10px;">保存订单</a>
|
||||
<hr class="layui-bg-gray">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var is_mobile="n"
|
||||
,dp_data // 全局数据
|
||||
,original_dd = ""
|
||||
,to_page_zsh
|
||||
,$
|
||||
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','rate'], function(){
|
||||
$ = layui.$
|
||||
var setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form
|
||||
,rate = layui.rate
|
||||
|
||||
|
||||
var url="./?_m=dp&_a=single&zsh="+get_url_param("zsh");
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
//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;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else if(json_data.code==2){
|
||||
//------------------重新登录
|
||||
url1="login.htm?error_msg="+json_data.msg;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else{
|
||||
//------------------填充内容
|
||||
console.log(["初始", json_data])
|
||||
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
|
||||
dp_data = json_data
|
||||
//------------上一组
|
||||
if (json_data.prev != "") {
|
||||
$("#btn-prev").attr("href", "javascript:toPage("+json_data.prev+")")
|
||||
} else {
|
||||
$("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一组了。')")
|
||||
}
|
||||
//------------下一组
|
||||
if (json_data.next != "") {
|
||||
$("#btn-next").attr("href", "javascript:toPage("+json_data.next+")")
|
||||
} else {
|
||||
$("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一组了。')")
|
||||
}
|
||||
//------------展示图片
|
||||
$("#content #pic").append("<img data-original='"+json_data.pic_big+"' src='"+json_data.pic_big+"' style='width: "+json_data.pic_big_w+"px; height: "+json_data.pic_big_h+"px; max-width: 300px; max-height: 400px;' watermark>")
|
||||
new Viewer(document.getElementById("pic"), {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
//------------说明
|
||||
$("#content #remark").html(json_data.dp_remark)
|
||||
//------------zsh
|
||||
$("#zsh").val(json_data.zsh)
|
||||
//------------uid
|
||||
$("#uid").val(json_data.uid)
|
||||
//------------ks_bx_num
|
||||
$("#ks_bx_num").val(json_data.ks_bx_num)
|
||||
//------------单款详细
|
||||
//--------表头
|
||||
var dk_header = "<tr class='-header'>"
|
||||
,col_count = 0 // 表头单元列列数(单元列:长度1的列),用于调整列宽
|
||||
,cm_front_count = 0 // 尺码前列数,用于放置“合计”的位置
|
||||
dk_header += "<td dk-w='3'>单款信息</td>"
|
||||
col_count += 3
|
||||
cm_front_count++
|
||||
dk_header += "<td dk-w='1'>颜色</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
if (json_data.bx_sizegroup_id && json_data.bx_sizegroup_id != "0") {
|
||||
dk_header += "<td dk-w='1'>杯型</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
} else if (json_data.child_sizegroup_id && json_data.child_sizegroup_id != "0") {
|
||||
dk_header += "<td dk-w='1'>款型</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
if (json_data.have_ggk != "n") {
|
||||
dk_header += "<td dk-w='1'>"+json_data.translate_gg+"</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
if (json_data.have_ggk == "y") {
|
||||
dk_header += "<td dk-w='1'>"+json_data.translate_gg1+"</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
if (json_data.pm_ms == "m2") {
|
||||
dk_header += "<td dk-w='1'>手数</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
dk_header += "<td colspan='?' dk-w='5' class='-col-cm'>尺码</td>"
|
||||
col_count += 5
|
||||
dk_header += "<td dk-w='1'>小计</td>"
|
||||
col_count++
|
||||
if (json_data.sys_ver_hy == "xz") { // 若sys_ver_hy=xz,则跳转到单款下单
|
||||
dk_header += "<td dk-w='1'></td>"
|
||||
col_count++
|
||||
}
|
||||
dk_header += "</tr>"
|
||||
$("#dks").append(dk_header)
|
||||
$("#dks .-header td").each(function() {
|
||||
$(this).width(100/col_count*parseInt($(this).attr("dk-w"))+"%") // 调整列宽
|
||||
})
|
||||
//--------表身
|
||||
var same_color_flag = 0 // 同款行标志,>0:同款,用于有无规格时样式
|
||||
,dk_all_total = 0 // 总合计
|
||||
,max_cm_col_count = 0 // 最大尺码列数,用于规范尺码列数样式
|
||||
for (var i = 0; i < json_data.dks.length; i++) {
|
||||
var dk = json_data.dks[i] // 行数据
|
||||
,dk_body_elem = "<tr pcki-mode='row' class='-body'>" // 行文本
|
||||
,current_cm_col_count = 0 // 当前行实际尺码列数
|
||||
if (same_color_flag == 0) $("#dks").append("<tr class='-line'><td><hr class='layui-bg-gray'></td></tr>") // 单款分割线
|
||||
for (var j = 0; j < dk.dd.length; j++) {
|
||||
var ddl = dk.dd[j]
|
||||
switch(ddl.no) {
|
||||
case "1": // 单款信息格等
|
||||
if (j==0) { // 单款信息格
|
||||
if (same_color_flag == 0) {
|
||||
dk_body_elem += "<td rowspan='"+dk.ggs+"' class='layui-row kh_list-container'>"
|
||||
dk_body_elem += "<input pcki-mode='none' name='khid_"+i+"' value='"+dk.khid+"' style='display:none;'>"
|
||||
dk_body_elem += "<input pcki-mode='none' name='color_"+i+"' value='"+dk.color+"' style='display:none;'>"
|
||||
dk_body_elem += "<div class='layui-col-lg6 layui-col-md6 layui-col-sm6 layui-col-xs6 layui-col-xxs12' style=''><a href='javascript:openDkSingle("+dk.khid+")'><div style='width: 100px; height: 100px; line-height: 100px;'>"
|
||||
dk_body_elem += "<img src='"+dk.pic+"' style='max-width: 100px; max-height: 100px;' watermark>" // div1 > pic
|
||||
if (json_data.bs_kh_dj == "word" && dk.kh_dj) {
|
||||
dk_body_elem += "<span style='position: absolute; top: 0; left: 0; width: 18px; word-wrap: break-word; background-color: #F06054; color: white; padding: 4px 2px; border-radius: 4px; z-index: 9; line-height: 20px;'>"+dk.kh_dj+"</span>"
|
||||
} else if (json_data.bs_kh_dj == "pic" && dk.kh_dj) {
|
||||
dk_body_elem += "<img src='../attachments/"+dk.kh_dj+".png' style='position: absolute; top: 0; left: 0;' watermark>"
|
||||
}
|
||||
dk_body_elem += "</div></a></div>"
|
||||
dk_body_elem += "<div class='layui-col-lg6 layui-col-md6 layui-col-sm6 layui-col-xs6 layui-col-xxs12' style=''>" // div2
|
||||
dk_body_elem += "<a href='javascript:openDkSingle("+dk.khid+")'><div id='"+ddl.id+"' style='"+dk.sty1+" display: inline-block;'>"+ddl.value+"</a></div>" // > info
|
||||
|
||||
//---- > xj_big
|
||||
dk_body_elem += "<div id='kh_hide_"+dk.khid+"' class='kh_hide'>"
|
||||
dk_body_elem += "<div id='div_pj_"+dk.khid+"_icon_big'>"+get_pj_icon(dk.xj,dk.khid,"big","y")+"</div>"
|
||||
dk_body_elem += "<div class='div_button_del_pj' style='display:"+(dk.xj > 0 ? "" : "none")+"; padding: 1px;' id='div_button_del_pj_"+dk.khid+"'><a type='button' id='button_del_pj_"+dk.khid+"' class='layui-btn layui-btn-sm button_del_pj' onclick='del_pj("+dk.khid+")' style='background-color:#F04122;'>删除评价</a></div>"
|
||||
dk_body_elem += "</div>"
|
||||
//---- end > xj_big
|
||||
dk_body_elem += "<div class='xj' id='div_pj_"+dk.khid+"_icon_mini' onclick='show_hide_kh_hide("+dk.khid+")' style='float: right;'>"+get_pj_icon(dk.xj,dk.khid,"mini","n")+"</div>" // > xj_mini
|
||||
dk_body_elem += "</div>"
|
||||
dk_body_elem += "</td>"
|
||||
same_color_flag = dk.ggs - 1
|
||||
} else {
|
||||
same_color_flag--
|
||||
break
|
||||
}
|
||||
} else { // 规格等其他
|
||||
dk_body_elem += "<td><span>"+ddl.value+"</span></td>"
|
||||
}
|
||||
break
|
||||
case "2": // 颜色格
|
||||
var ggs = parseInt(dk.ggs ? dk.ggs : '0')
|
||||
if (same_color_flag === ggs - 1) {
|
||||
dk_body_elem += "<td rowspan='"+dk.ggs+"'>"
|
||||
dk_body_elem += (dk.ka != "y" ? "<span>"+ddl.value+"</span>" : "<span style='color: #F04122;'><s class='del-color'>"+ddl.value+"</s></span>")
|
||||
dk_body_elem += "<input pcki-mode='none' name='bx_"+i+"' value='"+dk.bx+"' style='display:none;'>"
|
||||
dk_body_elem += "</td>"
|
||||
}
|
||||
break
|
||||
case "3": // 尺码格
|
||||
// if (json_data.pm_ms === 'm2') {
|
||||
// dk_body_elem += "<td class='-col-cm'><div></div><div><input type='number' value='' class='layui-input' style='text-align: center;' pcki-change='changeOrder' pcki-save='saveOrder'"+(ddl.disable || dk.ka == "y" ? ' pcki-mode="disabled"' : '')+"></div></td>"
|
||||
// }
|
||||
if (json_data.face == "2" || json_data.sys_ver_hy == "xz") {
|
||||
dk_body_elem += "<td class='-col-cm'><div>"+ddl.size+"</div><div style='height: 38px; line-height: 38px;'>"+(ddl.value ? ddl.value : "0")+"</div></td>"
|
||||
} else {
|
||||
dk_body_elem += "<td class='-col-cm'><div>"+ddl.size+"</div><div><input type='number' id='"+ddl.id+"' name='"+ddl.id+"' value='"+ddl.value+"' class='layui-input' style='text-align: center;' pcki-change='changeOrder' pcki-save='saveOrder'"+(json_data.pm_ms==='m2'||ddl.disable || dk.ka == "y" ? ' pcki-mode="disabled"' : '')+"></div></td>"
|
||||
}
|
||||
max_cm_col_count = Math.max(max_cm_col_count, ++current_cm_col_count)
|
||||
original_dd += ddl.value+","
|
||||
break
|
||||
case "4":
|
||||
dk_body_elem += "<td><span>"+ddl.value+"</span></td>"
|
||||
break
|
||||
case "5": // 小计格
|
||||
dk_body_elem += "<td class='-row-total'><div style='height: 20px;'></div><div class='-value' style='height: 38px; line-height: 38px;'>"+ddl.value+"</div></td>"
|
||||
dk_all_total += parseInt(ddl.value)
|
||||
break
|
||||
case "6":
|
||||
break
|
||||
case "9": // 空位尺码
|
||||
dk_body_elem += '<td class="-col-cm"></td>'
|
||||
max_cm_col_count = Math.max(max_cm_col_count, ++current_cm_col_count)
|
||||
break
|
||||
}
|
||||
}
|
||||
dk_body_elem += '<td><div style="height: 20px;"></div><div>'+((json_data.face == "2" || json_data.sys_ver_hy == "xz") && dk.ka != 'y' ? '<a href="javascript:openDkSingle('+dk.khid+')" class="layui-btn layui-btn-sm" style="background-color: #F04122; margin-right: 10px;">去下单</a>' : '')+'</div></td>' // 区经下单、鞋子下单:去下单
|
||||
dk_body_elem += "</tr>"
|
||||
|
||||
dk_body_elem = $(dk_body_elem)
|
||||
if (json_data.pm_ms === 'm2') {
|
||||
dk_body_elem.find('.-col-cm:nth(0)').before('<td><div style="height: 18px;"></div><div><input type="number" class="layui-input" pcki-nojpty pcki-move="pm" pcki-nocypm="nocypm" data-pm="'+dk.default_pm+'" style="text-align: center;" pcki-change="changeSh" pcki-save="saveOrder"'+(ddl.disable||dk.ka=='y'?' pcki-mode="disabled"':'')+'></div></td>')
|
||||
}
|
||||
$("#dks").append(dk_body_elem)
|
||||
}
|
||||
// $("#dks .-body").each(function() { // 补全表身尺码的列数
|
||||
// var col_cm_count = $(this).find(".-col-cm").length
|
||||
// for(var i = 0; i < max_cm_col_count - col_cm_count; i++) {
|
||||
// $(this).find(".-row-total").before("<td class='-col-cm'></td>")
|
||||
// }
|
||||
// })
|
||||
$("#dks .-body .-col-cm").width((100/col_count*parseInt($("#dks .-header .-col-cm").attr("dk-w")))/max_cm_col_count+"%") // 统一尺码小格长度
|
||||
$("#dks .-header .-col-cm").attr({"colspan": max_cm_col_count}) // 补全表头尺码的跨度
|
||||
$("#dks .-line td").attr("colspan", col_count+max_cm_col_count) // 补全分割线的跨度
|
||||
pInitCustomKeyboard({
|
||||
pck_enabled: json_data.sys_ck_input
|
||||
,pck_cypm: json_data.cypm
|
||||
,pck_jpty: json_data.jpty
|
||||
,pck_uid: json_data.uid
|
||||
,pck_page: "dp"
|
||||
}) // 键盘初始化
|
||||
$('.del-color').on('click', function(){ // 设定删除款tip
|
||||
layer.tips('已删除', this); //在元素的事件回调体中,follow直接赋予this即可
|
||||
})
|
||||
//--------表尾
|
||||
$("#dks").append("<tr><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 分割线
|
||||
var dk_footer = "<tr class='-footer'><td colspan='"+cm_front_count+"' style='text-align: right;'>合计</td>"
|
||||
dk_footer += "<td colspan='"+max_cm_col_count+"'></td>"
|
||||
dk_footer += "<td class='-all-total'>"+dk_all_total+"</td></tr>"
|
||||
$("#dks").append(dk_footer)
|
||||
//------------订单操作
|
||||
if (json_data.face == "2" || json_data.sys_ver_hy == "xz") $("#dk-opt-box").css("display", "none")
|
||||
|
||||
// 添加水印
|
||||
USetWatermark({
|
||||
is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
})
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
}
|
||||
);
|
||||
// 保存订单,提交订单
|
||||
form.on("submit(dk-save)", function(data) {
|
||||
console.log(["提交", data.field])
|
||||
original_dd = setDdString()
|
||||
var url="./?_m=dp&_a=save";
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,data: data.field
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(["反馈", res_jsondata])
|
||||
if (res_jsondata.code == 101) {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作成功。")
|
||||
if (typeof window.parent.update_yd && typeof window.parent.update_yd == "function") window.parent.update_yd()
|
||||
else if (window.parent.frames["layadmin-iframe"] && typeof window.parent.frames["layadmin-iframe"].update_yd == "function") window.parent.frames["layadmin-iframe"].update_yd()
|
||||
} else {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
if (to_page_zsh
|
||||
|
||||
) location.href = "dp_single.htm?zsh=" + to_page_zsh
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
return true
|
||||
})
|
||||
|
||||
// 搜索,搭配号
|
||||
$("#btn-search").click(function() {
|
||||
if (!$("#s-title input").val().replace(/ /g, "")) return true
|
||||
var url="./?_m=dp&_a=single&s_title="+$("#s-title input").val()
|
||||
console.log(url)
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(res_jsondata)
|
||||
if (res_jsondata.code == 100) {
|
||||
toPage(res_jsondata.zsh)
|
||||
} else if (res_jsondata.code == 101) {
|
||||
var content_html = "<div style='padding: 15px;'>找到以下符合条件的多项,请选择:</div>"
|
||||
for (var i = 0; i < res_jsondata.msg.length; i++) {
|
||||
var msgl = res_jsondata.msg[i]
|
||||
content_html += '<a href="javascript:toPage('+msgl.zsh+')" style="display: block; float: left; width: 60px; padding: 10px; color: blue; text-decoration: underline;">'+msgl.title+'</a>'
|
||||
}
|
||||
layer.open({
|
||||
type: 1
|
||||
,title: false //不显示标题栏
|
||||
,closeBtn: true
|
||||
,area: '300px;'
|
||||
,shade: 0.8
|
||||
,id: 'dp-location' //设定一个id,防止重复弹出
|
||||
// ,btn: ['火速围观', '残忍拒绝']
|
||||
,btnAlign: 'c'
|
||||
,moveType: 1 //拖拽模式,0或者1
|
||||
,content: content_html
|
||||
})
|
||||
} else {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
|
||||
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
// 将iframe的高度同步为其父元素.layui-layer-iframe的高度
|
||||
$(this).find("[name="+window_name+"]").height($(this).height())
|
||||
})
|
||||
})
|
||||
|
||||
// 修改手数
|
||||
function changeSh(elem) {
|
||||
if (parseInt(elem.val()) < 0) {
|
||||
layui.layer.msg("数值无效。")
|
||||
elem.val("")
|
||||
}
|
||||
var pm = elem.attr('data-pm').split(':')
|
||||
var value = parseInt(elem.val() ? elem.val() : '0')
|
||||
elem.parents('tr').find('.-col-cm input').each(function(index) {
|
||||
var pmv = pm.length > index ? pm[index] : ''
|
||||
pmv = parseInt(pmv ? pmv : '0')
|
||||
$(this).val(pmv * value)
|
||||
$(this).change()
|
||||
})
|
||||
}
|
||||
// 修改订单
|
||||
function changeOrder(elem) {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
if (parseInt(elem.val()) < 0) {
|
||||
layui.layer.msg("数值无效。")
|
||||
elem.val("")
|
||||
}
|
||||
var dk_row_total = 0
|
||||
elem.parents(".-body").find(".-col-cm input").each(function() {
|
||||
dk_row_total += parseInt($(this).val() != "" ? $(this).val() : "0")
|
||||
})
|
||||
elem.parents(".-body").find(".-row-total .-value").html(dk_row_total)
|
||||
var dk_all_total = 0
|
||||
$("#dks .-body .-row-total .-value").each(function() {
|
||||
dk_all_total += parseInt($(this).html() ? $(this).html() : 0)
|
||||
})
|
||||
$("#dks .-footer .-all-total").html(dk_all_total)
|
||||
})
|
||||
}
|
||||
// 保存订单
|
||||
function saveOrder() {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
$("#dk-save").click()
|
||||
})
|
||||
}
|
||||
//显示,隐藏评价层
|
||||
function show_hide_kh_hide(id){
|
||||
layui.use('jquery', function(){
|
||||
var $=layui.jquery;
|
||||
$("#kh_hide_"+id).toggle(500);
|
||||
})
|
||||
}
|
||||
|
||||
function setDdString() {
|
||||
var dd_string = ""
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
$("#dks .-body .-col-cm input").each(function() {
|
||||
dd_string += $(this).val() + ","
|
||||
})
|
||||
})
|
||||
return dd_string
|
||||
}
|
||||
// 跳转,上一,下一
|
||||
function toPage(zsh) {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
var current_dd = setDdString()
|
||||
if (dp_data.face != "2" && dp_data.sys_ver_hy != 'xz' && original_dd !== current_dd) {
|
||||
if (confirm("您修改了订单,但还没有保存,是否保存?")) {
|
||||
to_page_zsh = zsh
|
||||
$("#dk-save").click()
|
||||
}
|
||||
}
|
||||
location.href = "dp_single.htm?zsh=" + zsh
|
||||
})
|
||||
}
|
||||
function openDkSingle(khid) {
|
||||
layui.use('layer', function(){
|
||||
var layer = parent.layer;
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
title: '',
|
||||
content: "dk_single"+(dp_data.face == "2" ? "_qj" : "")+".htm?khid="+khid,
|
||||
offset: 'b',
|
||||
closeBtn: 0,
|
||||
anim: 2
|
||||
});
|
||||
layer.full(index);
|
||||
})
|
||||
}
|
||||
function update_yd(khid) {
|
||||
location.reload()
|
||||
}
|
||||
// 关闭本页
|
||||
function close_this_frame() {
|
||||
layui.use('jquery', function(){
|
||||
var $ = layui.jquery
|
||||
var current_dd = setDdString()
|
||||
if (dp_data.face != "2" && dp_data.sys_ver_hy != 'xz' && original_dd !== current_dd) {
|
||||
if (confirm("您修改了订单,但还没有保存,是否保存?")) {
|
||||
$("#dk-save").click()
|
||||
}
|
||||
}
|
||||
u_close_this_div()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,368 @@
|
||||
<!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">
|
||||
<style>
|
||||
.pcki-page {overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch;}
|
||||
#content #info .title{color: #9b9b9b; text-align: right;}
|
||||
#content #info .text{font-weight: bold; text-align: left;}
|
||||
#dks td>div {padding: 1px;}
|
||||
.kh_list-container {position: relative;}
|
||||
.kh_list-container .kh_hide{display:none;min-width:100%;position:absolute;right:0px;bottom:23px;background:#f5f5f5;filter:alpha(Opacity=90);-moz-opacity:0.9;opacity: 0.9;}
|
||||
.kh_list-container .kh_hide table {margin: auto;}
|
||||
#dks .-body input { max-width: 80px; margin: auto;}
|
||||
#dks .-body .layui-input { padding-left: 0px;}
|
||||
</style>
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<!-- 引入 -->
|
||||
<!-- universal -->
|
||||
<script src="js/universal/universal.js"></script>
|
||||
<link rel="stylesheet" href="js/universal/universal.css">
|
||||
<!-- viewer js -->
|
||||
<script src="js/viewer/viewer.min.js"></script>
|
||||
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="pcki-page">
|
||||
<!-- 顶部标题栏 -->
|
||||
<div class="state_bar">
|
||||
<div class="text_title">搭配区经详情</div>
|
||||
<div class="btn_close" onclick="u_close_this_div();"><img src="images/close.png" width=30 height=30 border=0></div>
|
||||
</div>
|
||||
<!--头部 上下款 搜索-->
|
||||
<div class="header">
|
||||
<a id="btn-prev" class="-btn-into" style="position: absolute; top: 0; left: 20px;"><i class="layui-icon layui-icon-left"></i>上一组</a>
|
||||
<div id="s-title" class="layui-input-inline" style="width: 20%; margin-right: 10px; max-width: 150px; min-width: 100px;"><input type="text" name="" placeholder="搭配号" class="layui-input" style="border-radius:10px 10px 10px 10px;"></div>
|
||||
<a id="btn-search" class="layui-btn layui-input-inline" style="border-radius:10px 10px 10px 10px; background-color: #F04122; padding: 0 10px;">查询</a>
|
||||
<a id="btn-next" class="-btn-into" style="position: absolute; top: 0; right: 20px;">下一组<i class="layui-icon layui-icon-right"></i></a>
|
||||
</div>
|
||||
<!-- 信息层 -->
|
||||
<div id="content">
|
||||
<div class="" style="margin-top: 20px; margin-bottom: 20px;">
|
||||
<div id="pic" style="box-shadow: 1px 1px 10px 3px #d0d0d0; width: 300px; height: 400px; line-height: 400px;"></div>
|
||||
</div>
|
||||
<div style="margin: 5px 0;">
|
||||
<div id="remark"></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="layui-bg-gray">
|
||||
<!-- 单款详细 -->
|
||||
<input id="dk-zsh" name="zsh" style="display: none;">
|
||||
<input id="dk-uid" name="uid" style="display: none;">
|
||||
<table id="dks" style="width: 96%; margin: auto;"></table>
|
||||
<hr class="layui-bg-gray">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var is_mobile="n"
|
||||
,dp_data // 全局数据
|
||||
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'user','rate'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form
|
||||
,rate = layui.rate
|
||||
|
||||
var url="./?_m=dp&_a=single&zsh="+get_url_param("zsh");
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
//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;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else if(json_data.code==2){
|
||||
//------------------重新登录
|
||||
url1="login.htm?error_msg="+json_data.msg;
|
||||
var obj1=window.parent.parent?window.parent.parent:window.parent; obj1.location.href=url1;
|
||||
}else{
|
||||
//------------------填充内容
|
||||
console.log(["初始", json_data])
|
||||
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
|
||||
dp_data = json_data
|
||||
//------------上一组
|
||||
if (json_data.prev != "") {
|
||||
$("#btn-prev").attr("href", "dp_single_qj.htm?zsh="+json_data.prev)
|
||||
} else {
|
||||
$("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一组了。')")
|
||||
}
|
||||
//------------下一组
|
||||
if (json_data.next != "") {
|
||||
$("#btn-next").attr("href", "dp_single_qj.htm?zsh="+json_data.next)
|
||||
} else {
|
||||
$("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一组了。')")
|
||||
}
|
||||
//------------展示图片
|
||||
$("#content #pic").append("<img data-original='"+json_data.pic_big+"' src='"+json_data.pic_big+"' style='width: "+json_data.pic_big_w+"px; height: "+json_data.pic_big_h+"px; max-width: 300px; max-height: 400px;' watermark>")
|
||||
new Viewer(document.getElementById("pic"), {
|
||||
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
|
||||
})
|
||||
}
|
||||
})
|
||||
//------------说明
|
||||
$("#content #remark").html(json_data.dp_remark)
|
||||
//------------zsh
|
||||
$("#dk-zsh").val(json_data.zsh)
|
||||
//------------uid
|
||||
$("#dk-uid").val(json_data.uid)
|
||||
//------------单款详细
|
||||
//--------表头
|
||||
var dk_header = "<tr class='-header'>"
|
||||
,col_count = 0 // 表头单元列列数(单元列:长度1的列),用于调整列宽
|
||||
,cm_front_count = 0 // 尺码前列数,用于放置“合计”的位置
|
||||
dk_header += "<td dk-w='3'>单款信息</td>"
|
||||
col_count += 3
|
||||
cm_front_count++
|
||||
dk_header += "<td dk-w='1'>颜色</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
if (json_data.bx_sizegroup_id && json_data.bx_sizegroup_id != "0") {
|
||||
dk_header += "<td dk-w='1'>杯型</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
} else if (json_data.child_sizegroup_id && json_data.child_sizegroup_id != "0") {
|
||||
dk_header += "<td dk-w='1'>款型</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
if (json_data.have_ggk != "n") {
|
||||
dk_header += "<td dk-w='1'>"+json_data.translate_gg+"</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
if (json_data.have_ggk == "y") {
|
||||
dk_header += "<td dk-w='1'>"+json_data.translate_gg1+"</td>"
|
||||
col_count++
|
||||
cm_front_count++
|
||||
}
|
||||
dk_header += "<td colspan='?' dk-w='5' class='-col-cm'>尺码</td>"
|
||||
col_count += 5
|
||||
dk_header += "<td dk-w='1'>小计</td>"
|
||||
col_count++
|
||||
dk_header += "</tr>"
|
||||
$("#dks").append(dk_header)
|
||||
$("#dks .-header td").each(function() {
|
||||
$(this).width(100/col_count*parseInt($(this).attr("dk-w"))+"%") // 调整列宽
|
||||
})
|
||||
//--------表身
|
||||
var same_color_flag = 0 // 同款行标志,>0:同款,用于有无规格时样式
|
||||
,dk_all_total = 0 // 总合计
|
||||
,max_cm_col_count = 0 // 最大尺码列数,用于规范尺码列数样式
|
||||
for (var i = 0; i < json_data.dks.length; i++) {
|
||||
var dk = json_data.dks[i] // 行数据
|
||||
,dk_body_elem = "<tr class='-body'>" // 行文本
|
||||
,current_cm_col_count = 0 // 当前行实际尺码列数
|
||||
if (same_color_flag == 0) $("#dks").append("<tr class='-line'><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 单款分割线
|
||||
for (var j = 0; j < dk.dd.length; j++) {
|
||||
var ddl = dk.dd[j]
|
||||
switch(ddl.no) {
|
||||
case "1": // 单款信息格等
|
||||
if (j==0) { // 单款信息格
|
||||
if (same_color_flag == 0) {
|
||||
dk_body_elem += "<td rowspan='"+dk.ggs+"' class='layui-row kh_list-container'>"
|
||||
dk_body_elem += "<div class='layui-col-lg6 layui-col-md6 layui-col-sm6 layui-col-xs6 layui-col-xxs12' style=''><a href='dk_single"+(json_data.face == "2" ? "_qj" : "")+".htm?khid="+dk.khid+"'><div style='width: 100px; height: 100px; line-height: 100px;'>"
|
||||
dk_body_elem += "<img src='"+dk.pic+"' style='max-width: 100px; max-height: 100px;' watermark>" // div1 > pic
|
||||
if (json_data.bs_kh_dj == "word" && dk.kh_dj) {
|
||||
dk_body_elem += "<span style='position: absolute; top: 0; left: 0; writing-mode: vertical-lr; background-color: #ff0000c7; color: white; padding: 4px 2px; border-radius: 2px; width: 20px; line-height: 20px;'>"+dk.kh_dj+"</span>"
|
||||
} else if (json_data.bs_kh_dj == "pic" && dk.kh_dj) {
|
||||
dk_body_elem += "<img src='../attachments/"+dk.kh_dj+".png' style='position: absolute; top: 0; left: 0;' watermark>"
|
||||
}
|
||||
dk_body_elem += "</div></a></div>"
|
||||
dk_body_elem += "<div class='layui-col-lg6 layui-col-md6 layui-col-sm6 layui-col-xs6 layui-col-xxs12' style=''>" // div2
|
||||
dk_body_elem += "<a href='dk_single.htm"+(json_data.face == "2" ? "_qj" : "")+"?khid="+dk.khid+"'><div id='"+ddl.id+"' style='"+dk.sty1+" display: inline-block;'>"+ddl.value+"</a></div>" // > info
|
||||
|
||||
//---- > xj_big
|
||||
dk_body_elem += "<div id='kh_hide_"+dk.khid+"' class='kh_hide'>"
|
||||
dk_body_elem += "<div id='div_pj_"+dk.khid+"_icon_big'>"+get_pj_icon(dk.xj,dk.khid,"big","y")+"</div>"
|
||||
dk_body_elem += "<div class='div_button_del_pj' style='display:"+(dk.xj > 0 ? "" : "none")+"; padding: 1px;' id='div_button_del_pj_"+dk.khid+"'><button type='button' id='button_del_pj_"+dk.khid+"' class='layui-btn layui-btn-sm button_del_pj' onclick='del_pj("+dk.khid+")' style='background-color:#F04122;'>删除评价</button></div>"
|
||||
dk_body_elem += "</div>"
|
||||
//---- end > xj_big
|
||||
dk_body_elem += "<div class='xj' id='div_pj_"+dk.khid+"_icon_mini' onclick='show_hide_kh_hide("+dk.khid+")' style='float: right;'>"+get_pj_icon(dk.xj,dk.khid,"mini","n")+"</div>" // > xj_mini
|
||||
dk_body_elem += "</div>"
|
||||
dk_body_elem += "</td>"
|
||||
same_color_flag = dk.ggs - 1
|
||||
} else {
|
||||
same_color_flag--
|
||||
break
|
||||
}
|
||||
} else { // 规格等其他
|
||||
dk_body_elem += "<td><span id='"+ddl.id+"'>"+ddl.value+"</span></td>"
|
||||
}
|
||||
break
|
||||
case "2": // 颜色格
|
||||
var ggs = parseInt(dk.ggs ? dk.ggs : '0')
|
||||
if (same_color_flag === ggs - 1) {
|
||||
dk_body_elem += "<td rowspan='"+dk.ggs+"'>"+(dk.ka != "y" ? "<div style='height: 20px;'>"+ddl.value.replace("<br>", "")+"</div>" : "<div style='height: 20px; color: #F04122;'><s class='del-color'>"+ddl.value.replace("<br>", "")+"</s></div>")+"<div><a href='dk_single_qj_xd.htm?khid="+0+"&color="+0+"&bx="+0+"&s_dpdj=_ALL_' class='layui-btn layui-btn-sm' style='background-color: #F04122; margin-right: 10px;'>下单</a></div></td>"
|
||||
}
|
||||
break
|
||||
case "3": // 尺码格
|
||||
dk_body_elem += "<td class='-col-cm'><div>"+ddl.size+"</div><div style='height: 38px;'>"+ddl.value+"</div></td>"
|
||||
max_cm_col_count = Math.max(max_cm_col_count, ++current_cm_col_count)
|
||||
break
|
||||
case "4":
|
||||
break
|
||||
case "5": // 小计格
|
||||
dk_body_elem += "<td class='-row-total'><div style='height: 20px;'></div><div class='-value' style='height: 38px;'>"+ddl.value+"</div></td>"
|
||||
dk_all_total += parseInt(ddl.value)
|
||||
break
|
||||
case "6":
|
||||
break
|
||||
case "9": // 空位尺码
|
||||
dk_body_elem += '<td class="-col-cm"></td>'
|
||||
break
|
||||
}
|
||||
}
|
||||
dk_body_elem += "</tr>"
|
||||
$("#dks").append(dk_body_elem)
|
||||
}
|
||||
$("#dks .-header .-col-cm").attr({"colspan": max_cm_col_count}) // 补全表头尺码的跨度
|
||||
// $("#dks .-body").each(function() { // 补全表身尺码的列数
|
||||
// var col_cm_count = $(this).find(".-col-cm").length
|
||||
// for(var i = 0; i < max_cm_col_count - col_cm_count; i++) {
|
||||
// $(this).find(".-row-total").before("<td class='-col-cm'></td>")
|
||||
// }
|
||||
// })
|
||||
pInitCustomKeyboard({
|
||||
pck_enabled: json_data.sys_ck_input,
|
||||
pck_cypm: json_data.cypm,
|
||||
pck_jpty: json_data.jpty,
|
||||
pck_uid: json_data.uid,
|
||||
pck_page: "dp"
|
||||
}) // 键盘初始化
|
||||
$('.del-color').on('click', function(){ // 设定删除款tip
|
||||
layer.tips('已删除', this); //在元素的事件回调体中,follow直接赋予this即可
|
||||
})
|
||||
//--------表尾
|
||||
$("#dks").append("<tr><td colspan='"+col_count+"'><hr class='layui-bg-gray'></td></tr>") // 分割线
|
||||
var dk_footer = "<tr class='-footer'><td colspan='"+cm_front_count+"' style='text-align: right;'>合计</td>"
|
||||
dk_footer += "<td colspan='"+max_cm_col_count+"'></td>"
|
||||
dk_footer += "<td class='-all-total'>"+dk_all_total+"</td></tr>"
|
||||
$("#dks").append(dk_footer)
|
||||
//------------订单操作
|
||||
if (json_data.face == "2") $("#dk-opt-box").css("display", "none")
|
||||
|
||||
// 添加水印
|
||||
USetWatermark({
|
||||
is_sy: json_data.is_sy
|
||||
,text: json_data.username
|
||||
})
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// 搜索
|
||||
$("#btn-search").click(function() {
|
||||
if (!$("#s-title input").val().replace(/ /g, "")) return true
|
||||
var url="./?_m=dp&_a=single_qj&s_title="+$("#s-title input").val()
|
||||
console.log(url)
|
||||
$.ajax({
|
||||
url: url
|
||||
,method: "POST"
|
||||
,success: function(res) {
|
||||
var res_jsondata = $.parseJSON(res)
|
||||
console.log(res_jsondata)
|
||||
if (res_jsondata.code == 100) {
|
||||
location.href = "dp_single_qj.htm?zsh="+res_jsondata.zsh
|
||||
} else if (res_jsondata.code == 101) {
|
||||
var content_html = "<div style='padding: 15px;'>找到以下符合条件的多项,请选择:</div>"
|
||||
for (var i = 0; i < res_jsondata.msg.length; i++) {
|
||||
var msgl = res_jsondata.msg[i]
|
||||
content_html += '<a href="dp_single_qj.htm?zsh='+msgl.zsh+'" style="display: block; float: left; width: 60px; padding: 10px; color: blue; text-decoration: underline;">'+msgl.title+'</a>'
|
||||
}
|
||||
layer.open({
|
||||
type: 1
|
||||
,title: false //不显示标题栏
|
||||
,closeBtn: true
|
||||
,area: '300px;'
|
||||
,shade: 0.8
|
||||
,id: 'dp-location' //设定一个id,防止重复弹出
|
||||
// ,btn: ['火速围观', '残忍拒绝']
|
||||
,btnAlign: 'c'
|
||||
,moveType: 1 //拖拽模式,0或者1
|
||||
,content: content_html
|
||||
})
|
||||
} else {
|
||||
if (res_jsondata.msg) layui.layer.msg(res_jsondata.msg)
|
||||
else layui.layer.msg("操作失败!")
|
||||
}
|
||||
}
|
||||
,beforeSend: function() { u_start_loading() }
|
||||
,complete: function() { u_stop_loading() }
|
||||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||||
})
|
||||
})
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
|
||||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||||
// 将iframe的高度同步为其父元素.layui-layer-iframe的高度
|
||||
$(this).find("[name="+window_name+"]").height($(this).height())
|
||||
})
|
||||
})
|
||||
|
||||
//显示,隐藏评价层
|
||||
function show_hide_kh_hide(id){
|
||||
layui.use('jquery', function(){
|
||||
var $=layui.jquery;
|
||||
$("#kh_hide_"+id).toggle(500);
|
||||
});
|
||||
}
|
||||
function update_yd() {
|
||||
location.reload()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,316 @@
|
||||
<!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">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
<script src="js/jquery.min.js"></script>
|
||||
<link href="js/signaturepad/jquery.signaturepad.css" rel="stylesheet" type="text/css" />
|
||||
<script language="javascript" src="js/signaturepad/jquery.signaturepad.js"></Script>
|
||||
<script src="js/signaturepad/json2.min.js"></script>
|
||||
</head>
|
||||
<body style="width:100%;background-color:#fff;">
|
||||
<div class="pcki-page" style="overflow-y: scroll; overflow-x: hidden; -webkit-overflow-scrolling: touch;">
|
||||
<div style="width:98%;height:100%;float:left;" id="dhxz">
|
||||
<div class="layui-row" id="tb" style="font-size:20px;margin-top:10px;">
|
||||
|
||||
</div>
|
||||
<form class="layui-form layui-form-pane" id="form1_search" method="post" >
|
||||
<input type="hidden" id="sign_qj" name="sign_qj" value="">
|
||||
<input type="hidden" id="sign_client" name="sign_client" value="">
|
||||
<input type="hidden" id="sign_sp" name="sign_sp" value="">
|
||||
<input type="hidden" id="_m" name="_m" value="dzqm">
|
||||
<input type="hidden" id="_a" name="_a" value="jlqz_save">
|
||||
<div class="layui-row" id="button" style="font-size:20px;margin-top:10px;">
|
||||
|
||||
</div>
|
||||
</from>
|
||||
<div class="layui-row" style="width:100%;float:left;margin-top:10px;height:100%;">
|
||||
<iframe src="" frameborder="0" name="wddd_iframe" id="wddd_iframe" width="100%" style="position:static;height:780px;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
var is_mobile="n";
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index','form','table','user','rate','element'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
var id=get_url_param("id");
|
||||
|
||||
//取得url传递参数
|
||||
var query_str=location.search.substring(1);
|
||||
if(query_str)
|
||||
query_str="&"+query_str;
|
||||
var url1="./?_m=dzqm"+query_str;
|
||||
_ajax(url1);
|
||||
function _ajax(url1){
|
||||
$.ajax({
|
||||
url:url1,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
$(".pcki-page").height($("#LAY_app_body", top.document).height())
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code=="100"){
|
||||
|
||||
|
||||
if(res.xsnr=="jlqz"){
|
||||
var html2="";
|
||||
//html2+=res.tb;
|
||||
//$("#tb").html(html2);
|
||||
var html2="";
|
||||
html2+="<form id='form_client' name='form_client'><div class='sigPad'><table border='0' cellspacing='1' cellpadding='3'><tr><td width='80' align='center'>客<br>户<br>签<br>字</td><td><canvas class='pad' id='can_client' width='600' height='300' style='background-color:#cccccc;border:1px solid #000000;'></canvas></td><td><input type='hidden' id='output_client' name='output_client' class='output' value=''><input type='reset' style='width:80px;height:30px;' value='重 写' ></td></tr></table></div></form>";
|
||||
html2+="<form id='form_qj' name='form_qj'><div class='sigPad'><table border='0' cellspacing='1' cellpadding='3'><tr><td width='80' align='center'>区<br>域<br>经<br>理<br>签<br>字</td><td><canvas class='pad' id='can_qj' width='600' height='300' style='background-color:#cccccc;border:1px solid #000000;'></canvas></td><td><input type='hidden' id='output_qj' name='output_qj' class='output' value=''><input type='reset' style='width:80px;height:30px;' value='重 写'></td></tr></table></div></form>";
|
||||
html2+="<form id='form_sp' name='form_sp'><div class='sigPad'><table border='0' cellspacing='1' cellpadding='3'><tr><td width='80' align='center'>商<br>品<br>经<br>理<br>签<br>字</td><td><canvas class='pad' id='can_client' width='600' height='300' style='background-color:#cccccc;border:1px solid #000000;'></canvas></td><td><input type='hidden' id='output_sp' name='output_sp' class='output' value=''><input type='reset' style='width:80px;height:30px;' value='重 写' ></td></tr></table></div></form>";
|
||||
html2+="<a id='tjqm' lay-filter='tjqm' class='layui-btn' style='background-color: #F04122;'>提交签名</a>";
|
||||
$("#button").html(html2);
|
||||
$('.sigPad').signaturePad({
|
||||
drawOnly:true,
|
||||
penWidth: 4,
|
||||
defaultAction: 'drawIt',
|
||||
validateFields: false,
|
||||
clear: 'input[type=reset]',
|
||||
lineWidth:0
|
||||
});
|
||||
}
|
||||
if(res.xsnr=="wddd"){
|
||||
console.log(res.url);
|
||||
var html2="<img src='"+res.ewmsrc+"' width='150' height='150' >";
|
||||
$("#tb").html(html2);
|
||||
var html2="";
|
||||
$("#button").html(html2);
|
||||
$("#wddd_iframe").attr('src',res.url);
|
||||
}
|
||||
$("#dd-jd").click(function(){
|
||||
console.log(123)
|
||||
if (confirm("订单一经提交不能修改,确认交单吗?")) {
|
||||
//$("#_a").val("qjsd");
|
||||
var url="./?_m=dzqm&_a=jd_do";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
}
|
||||
})
|
||||
|
||||
/*form.on("submit(dd-jd)",function(res){
|
||||
if (confirm("订单一经提交不能修改,确认交单吗?")) {
|
||||
var post_data=res.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
//$("#_a").val("qjsd");
|
||||
var url="./?_m=dzqm&_a=jd_do";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return false;
|
||||
}
|
||||
});*/
|
||||
$("#dd-thjd").click(function(){
|
||||
//$("#_a").val("qjsd");
|
||||
var url="./?_m=dzqm&_a=qjsd&cz=thjd";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
})
|
||||
/*form.on("submit(dd-thjd)",function(res){
|
||||
var post_data=res.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
//$("#_a").val("qjsd");
|
||||
var url="./?_m=dzqm&_a=qjsd&cz=thjd";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return false;
|
||||
});*/
|
||||
$("#dd-shtg").click(function(){
|
||||
//$("#_a").val("qjsd");
|
||||
var url="./?_m=dzqm&_a=qjsd&cz=qjqr";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
})
|
||||
/*form.on("submit(dd-shtg)",function(res){
|
||||
var post_data=res.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
//$("#_a").val("qjsd");
|
||||
var url="./?_m=dzqm&_a=qjsd&cz=qjqr";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return false;
|
||||
});*/
|
||||
$("#dd-thjd-do").click(function(){
|
||||
var post_str="";
|
||||
//$("#_a").val("qjsd_do");
|
||||
post_str+="&qj_username="+$("#qj_username").val();
|
||||
post_str+="&qj_password="+$("#qj_password").val();
|
||||
var url="./?_m=dzqm&_a=qjsd_do&cz=thjd"+post_str;
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
})
|
||||
/*form.on("submit(dd-thjd-do)",function(res){
|
||||
var post_data=data.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
//$("#_a").val("qjsd_do");
|
||||
post_str+="&qj_username="+$("#qj_username").val();
|
||||
post_str+="&qj_password="+$("#qj_password").val();
|
||||
var url="./?_m=dzqm&_a=qjsd_do&cz=thjd"+post_str;
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return false;
|
||||
});*/
|
||||
$("#dd-shtg-do").click(function(){
|
||||
var post_str="";
|
||||
//$("#_a").val("qjsd_do");
|
||||
post_str+="&qj_username="+$("#qj_username").val();
|
||||
post_str+="&qj_password="+$("#qj_password").val();
|
||||
var url="./?_m=dzqm&_a=qjsd_do&cz=shtg"+post_str;
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
})
|
||||
/*form.on("submit(dd-shtg-do)",function(data){
|
||||
var post_data=data.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
//$("#_a").val("qjsd_do");
|
||||
post_str+="&qj_username="+$("#qj_username").val();
|
||||
post_str+="&qj_password="+$("#qj_password").val();
|
||||
var url="./?_m=dzqm&_a=qjsd_do&cz=shtg"+post_str;
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return false;
|
||||
});*/
|
||||
$("#tjqm").click(function(){
|
||||
var sign_qj=document.getElementById("output_qj").value;
|
||||
var sign_client=document.getElementById("output_client").value;
|
||||
var sign_sp=document.getElementById("output_sp").value;
|
||||
var url1="./index.php";
|
||||
$.ajax({
|
||||
url:url1,
|
||||
data:{"sign_qj":sign_qj,"sign_client":sign_client,"sign_sp":sign_sp,"_m":"dzqm","_a":"jlqz_save","id":id},
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var url="./?_m=dzqm&_a=wddd&id="+id;
|
||||
_ajax(url);
|
||||
}})
|
||||
//layer.load();
|
||||
//layer.closeAll('loading');
|
||||
})
|
||||
/*form.on("submit(tjqm)",function(data){
|
||||
var sign_qj=document.getElementById("output_qj").value;
|
||||
var sign_client=document.getElementById("output_client").value;
|
||||
var sign_sp=document.getElementById("output_sp").value;
|
||||
if(sign_qj=="" || sign_client=="" || sign_sp==""){
|
||||
layui.layer.alert("请签名!");
|
||||
}else{
|
||||
var post_data=data.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
//post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
$("#sign_qj").val(sign_qj);
|
||||
$("#_a").val("jlqz_save");
|
||||
$("#sign_client").val(sign_client);
|
||||
$("#sign_sp").val(sign_sp);
|
||||
$.ajax({
|
||||
url:url1,
|
||||
data:post_data,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
|
||||
}})
|
||||
$("#form1_search").submit();
|
||||
//post_str+="&sign_qj="+sign_qj;
|
||||
//post_str+="&sign_client="+sign_client;
|
||||
//post_str+="&sign_sp="+sign_sp;
|
||||
//var url="./?_m=dzqm&_a=jlqz_save"+post_str;
|
||||
//layer.load();
|
||||
//_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return true;
|
||||
}
|
||||
});*/
|
||||
form.on("submit(fh)",function(data){
|
||||
var post_data=data.field;
|
||||
var post_str="";
|
||||
for(var item in post_data){
|
||||
post_str+="&"+item+"="+post_data[item];
|
||||
}
|
||||
var url="./?_m=dzqm";
|
||||
layer.load();
|
||||
_ajax(url);
|
||||
layer.closeAll('loading');
|
||||
return true;
|
||||
});
|
||||
}else{
|
||||
layui.layer.alert(res.msg);
|
||||
if(res.refresh=="y"){
|
||||
var url="./?_m=dzqm"
|
||||
//window.location.href=url;
|
||||
_ajax(url);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!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">
|
||||
<style>
|
||||
body{
|
||||
background: #2F4056;
|
||||
}
|
||||
.divBox{
|
||||
padding:20px; width:320px; position:absolute; left:50%; top:50%; margin:-150px 0 0 -150px; -webkit-box-sizing:border-box;-moz-box-sizing:border-box; -o-box-sizing:border-box;box-sizing:border-box; background:#fff;-webkit-border-radius:10px; -moz-border-radius:10px; border-radius:10px; box-shadow:0 0 20px #009688;
|
||||
}
|
||||
.wrong_msg{width:100%;height:60px;line-height:30px;color:#FF5722;font-weight:bold;text-align:center;}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="divBox" align="center">
|
||||
<div class="wrong_msg"></div>
|
||||
<div class="wrong_btn"></div>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
layui.use('form', function(){
|
||||
var $=layui.jquery;
|
||||
var form = layui.form;
|
||||
var error_msg=get_url_param("msg");
|
||||
var btn_title=get_url_param("btn_title");
|
||||
var btn_url=unescape(get_url_param("btn_url"));
|
||||
if(error_msg)
|
||||
$(".wrong_msg").html(error_msg);
|
||||
if(btn_title){
|
||||
var html1='<button type="button" class="layui-btn layui-btn-normal" onclick="window.location.href=\''+btn_url+'\'">刷新</button>';
|
||||
$(".wrong_btn").html(html1);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,72 @@
|
||||
<!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">
|
||||
<style>
|
||||
.search{width:100%;background-color:#fff;height:1000px;}
|
||||
</style>
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
</head>
|
||||
<body style="margin-top:10px;" onload="">
|
||||
<!--搜索-->
|
||||
<div class="search" style="padding:10px;" align="center">
|
||||
<div id="show_table"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
//取得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;
|
||||
var url="./?_m=ewm";
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
async:false,
|
||||
success: function (res) {
|
||||
var json_data=$.parseJSON(res);
|
||||
var res=$.parseJSON(res);
|
||||
var html1="";
|
||||
html1="<img src='data:image/png;base64,"+res.img_base64+"' width='400' height='400' border=0 >"
|
||||
$("#show_table").html(html1);
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
include "include/phpqrcode/qrlib.php";
|
||||
QRcode::png($_REQUEST['data'],false,'H',$_REQUEST['size']);
|
||||
?>
|
||||
@@ -0,0 +1,120 @@
|
||||
<!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" media="all">
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<script src="layuiadmin/layui/layui.js"></script>
|
||||
<script src="js/function.js"></script>
|
||||
</head>
|
||||
<body style="width:100%;">
|
||||
<div style="background-color:#ffffff;">
|
||||
|
||||
<div class="layui-row" style="background-color:#FFFFFF;padding-top:20px;width:100%;margin:0 auto;">
|
||||
<div style="width:655px;">
|
||||
<div class="layui-card" style="float:left;width:300px;background-color:#ccc;">
|
||||
<div class="layui-card-header">客户</div>
|
||||
<div class="layui-card-body" style="text-align:left;background-color:#fff;">
|
||||
<span id="client_detail"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card" style="margin-left:50px;float:left;width:300px;background-color:#ccc;">
|
||||
<div class="layui-card-header">款式</div>
|
||||
<div class="layui-card-body" style="text-align:left;background-color:#fff;">
|
||||
<span id="ks_detail"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="layui-row" style="margin-top:2px;height:400px;text-align:left;margin:0 auto;">
|
||||
<!-- 图表 -->
|
||||
<iframe id="frame_chart" src="" width="100%" style="height:400px;"></iframe>
|
||||
<!-- /图表结束 -->
|
||||
</div>
|
||||
<hr>
|
||||
<div class="layui-row" style="margin-top:2px;height:400px;text-align:left;margin:0 auto;">
|
||||
<!-- 图表 -->
|
||||
<iframe id="frame_chart2" src="" width="100%" style="height:400px;"></iframe>
|
||||
<!-- /图表结束 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var is_mobile="n";
|
||||
layui.config({
|
||||
base: './layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index','form','user','rate','element'], function(){
|
||||
var $ = layui.$
|
||||
,setter = layui.setter
|
||||
,admin = layui.admin
|
||||
,form = layui.form;
|
||||
var rate = layui.rate;
|
||||
var element = layui.element;
|
||||
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
$(window).on('resize', function(){
|
||||
//自动
|
||||
if(admin.screen()<2)
|
||||
is_mobile="y";
|
||||
});
|
||||
|
||||
var url="./?_m=boss_gl";
|
||||
$.ajax(
|
||||
{
|
||||
url:url,
|
||||
contentType: "application/json",
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
var res=$.parseJSON(res);
|
||||
|
||||
if(res.code==0){
|
||||
//------------------本页返回的错误信息
|
||||
layer.msg(res.msg);
|
||||
return false
|
||||
}else if(res.code==1){
|
||||
//------------------系统错误
|
||||
var msg=res.msg;
|
||||
var url2="error.htm?msg="+res.msg+"&btn_title="+res.btn_title+"&btn_url="+res.btn_url;
|
||||
window.parent.location.href=url2;
|
||||
}else if(res.code==2){
|
||||
//------------------重新登录
|
||||
var url2="login.htm?error_msg="+res.msg;
|
||||
window.parent.location.href=url2;
|
||||
}
|
||||
|
||||
var html1="";
|
||||
html1+="总计"+res.client_dt[0]+"家<br>";
|
||||
html1+="其中未订"+res.client_dt[1]+"家<br>";
|
||||
html1+="订的最高的是"+res.client_dt[2]+"订单"+res.client_dt[3]+"件,金额"+res.client_dt[4]+"元。";
|
||||
$("#client_detail").html(html1);
|
||||
|
||||
var html1="";
|
||||
html1+="总计"+res.ks_dt[0]+"款,"+res.ks_dt[1]+"色,删除"+res.ks_dt[2]+"款<br>";
|
||||
html1+="其中"+res.ks_dt[3]+"款无下单<br>";
|
||||
html1+="删除"+res.ks_dt[2]+"款,"+res.ks_dt[4]+"色";
|
||||
$("#ks_detail").html(html1);
|
||||
|
||||
//加载图表
|
||||
var url1="chart.php?t=pie&data_x="+res.chart_data_x+"&data_y="+res.chart_data_y+"&title="+res.chart_title;
|
||||
$("#frame_chart").attr('src',url1);
|
||||
//加载图表2
|
||||
var url1="chart.php?t="+res.chart_type2+"&data_x="+res.chart_data_x2+"&data_y="+res.chart_data_y2+"&title="+res.chart_title2;
|
||||
$("#frame_chart2").attr('src',url1);
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layui.layer.msg("与服务器通信失败!");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 724 B |
|
After Width: | Height: | Size: 753 B |
|
After Width: | Height: | Size: 739 B |
|
After Width: | Height: | Size: 696 B |
|
After Width: | Height: | Size: 596 B |
|
After Width: | Height: | Size: 361 B |
|
After Width: | Height: | Size: 199 B |
|
After Width: | Height: | Size: 423 B |
|
After Width: | Height: | Size: 622 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 600 B |
|
After Width: | Height: | Size: 592 B |
|
After Width: | Height: | Size: 603 B |
|
After Width: | Height: | Size: 732 B |
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 546 B |
|
After Width: | Height: | Size: 495 B |
|
After Width: | Height: | Size: 492 B |
|
After Width: | Height: | Size: 557 B |
|
After Width: | Height: | Size: 668 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 661 B |
|
After Width: | Height: | Size: 912 B |
|
After Width: | Height: | Size: 409 B |
|
After Width: | Height: | Size: 801 B |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 548 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 996 B |
|
After Width: | Height: | Size: 435 B |
|
After Width: | Height: | Size: 878 B |
|
After Width: | Height: | Size: 536 B |
|
After Width: | Height: | Size: 523 B |
|
After Width: | Height: | Size: 712 B |
|
After Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 583 B |
|
After Width: | Height: | Size: 994 B |
|
After Width: | Height: | Size: 716 B |
|
After Width: | Height: | Size: 651 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 797 B |
|
After Width: | Height: | Size: 689 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 818 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 723 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 943 B |
|
After Width: | Height: | Size: 637 B |
|
After Width: | Height: | Size: 789 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 730 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 409 B |