7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
392 lines
12 KiB
HTML
392 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>订单明细-e订通</title>
|
|
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
|
|
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" href="index.css">
|
|
<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> |