7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
272 lines
14 KiB
HTML
272 lines
14 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>
|
|
.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> |