This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/iphone/tys_single.htm
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

274 lines
13 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 #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;}
.ty-show-active {border: solid 1px blue;}
</style>
<script src="layuiadmin/layui/layui.js"></script>
<script src="js/function.js"></script>
<!-- jquery -->
<script src="js/jquery.min.js"></script>
<!-- 引入 -->
<!-- universal -->
<script src="js/universal/universal.js"></script>
<link rel="stylesheet" href="js/universal/universal.css?v=1">
<!-- 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 style="background-color: #f0f0f0;">
<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" style="padding: 0 10px;">
<div id="pic" style="margin-top: 10px; margin-bottom: 10px;"></div>
</div>
<hr class="layui-bg-gray">
<!-- 搭配 -->
<div style="position: relative;">
<div id="dps" style="overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; position: relative;"></div>
</div>
<hr class="layui-bg-gray">
</div>
<script>
var is_mobile="n"
,orginal_dd = ""
,ty_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=tys&_a=single&zsh="+get_url_param("zsh");
$.ajax(
{
url:url,
contentType: "application/json",
method: 'POST',
success: function (res) {
var json_data=$.parseJSON(res);
ty_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($(".layui-layer-iframe", top.document).width())
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
$(".pcki-page").height($(".layui-layer-iframe", top.document).height())
//------------上一组
if (json_data.prev != "") {
$("#btn-prev").attr("href", "tys_single.htm?zsh="+json_data.prev)
} else {
$("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一组了。')")
}
//------------下一组
if (json_data.next != "") {
$("#btn-next").attr("href", "tys_single.htm?zsh="+json_data.next)
} else {
$("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一组了。')")
}
//------------陈列
$("#pic").append("<div style='width: 400px; height: 300px; line-height: 300px; box-shadow: rgb(208, 208, 208) 1px 1px 10px 3px; max-width: "+Math.min($("#content").width()-20, 400)+"px;'><img data-original='"+json_data.pic+"' src='"+json_data.pic+"' style='width: "+json_data.pic_w+"px; height: "+json_data.pic_h+"px; max-width: "+Math.min($("#content").width()-20, 400)+"px; max-height: 300px;' ></div>")
//------------查看大图
new Viewer(document.getElementById("pic"), U_VIEWER_PARM)
//------------搭配
$("#dps").width(window.innerWidth)
var dpsl = json_data.dps.length
,dp_html = "<div style='width: "+(210*dpsl)+"px;'>"
for (var i = 0; i < dpsl; i++) {
var dp = json_data.dps[i]
dp_html += "<div id='tydp-"+dp.zsh+"' style='display: inline-block; padding: 0 5px; vertical-align: top;'>"
dp_html += "<div>"+dp.title+"</div>"
dp_html += "<a href='javascript: showZs(\""+dp.zsh+"\", \""+json_data.zsh+"\", \""+dp.title+"\")'><div class='-intact' style='width: 200px; height: 200px; line-height: 200px; position: relative;'>"
dp_html += "<img src='"+dp.pic+"' style='width: "+dp.pic_w+"px; height: "+dp.pic_h+"px;'>"
// dp_html += "<div style='position: absolute; top: 0; right: 0; width: 20px; line-height: 16px; background: red; color: yellow; border-radius: 5px;'>"
// for (var j = 0; j < dp.zds.length; j++) {
// dp_html += dp.zds[j]
// }
// dp_html += "</div>"
dp_html += "</div></a>"
dp_html += "<div>"+(i+1)+"</div>"
// dp_html += "<div class='-ydwz' style='text-align: center; margin: 5px 0;'>"
// for (var l = 0; l < dp.dhqk.length; l++) {
// var dhqk = dp.dhqk[l]
// dp_html += "<div>"+dhqk.wz+": "+dhqk.num+"件</div>"
// }
// dp_html += "</div>"
dp_html += "<div class='-ydwz' style='text-align: center; margin: 5px 0;'>"
dp_html += "</div>"
dp_html += "</div>"
}
dp_html += "</div>"
$("#dps").append(dp_html)
}
}
,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 json_data = $.parseJSON(res)
console.log(json_data)
if (json_data.code == 100) {
location.href = "dk_single"+(json_data.face == "2" ? "_qj" : "")+".htm?khid="+json_data.khid
} else if (json_data.code == 101) {
var content_html = "<div style='padding: 15px;'>找到以下符合条件的多项,请选择:</div>"
for (var i = 0; i < json_data.msg.length; i++) {
var msgl = json_data.msg[i]
content_html += '<a href="dk_single'+(json_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 {
layui.layer.msg(json_data.msg ? json_data.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";
});
$(".layui-layer-iframe", top.document).on("resize", function() {
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
$(".pcki-page").width($(".layui-layer-iframe", top.document).width())
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
$(".pcki-page").height($(".layui-layer-iframe", top.document).height())
})
})
function showZs(sh, zsh, dph) {
layui.use([], function() {
var $ = layui.$
if (zsh) {
$.ajax({
url: "./?_m=tys&_a=get_data&s_zsh="+zsh+"&dph="+dph,
success: function(res) {
var json_data = $.parseJSON(res)
,ydwz_html = ""
console.log(json_data)
ydwz_html += "<div style='margin: 5px;'><a href='javascript: openTph(\""+zsh+"\")' style='font-weight: bold;font-size: 16px;'>套排行: "+json_data.tph+"</a></div>"
ydwz_html += "<div style='margin: 5px;'><a href='javascript: openKhs(\""+dph+"\")' style='font-weight: bold;font-size: 16px;'>客户数: "+json_data.khs+"</a></div>"
ydwz_html += "<div style='margin: 5px;'><a href='javascript: openJs(\""+dph+"\")' style='font-weight: bold;font-size: 16px;'>件数:"+json_data.js+"</a></div>"
var dlkhjss = json_data.dlkhjs.split("|")
for (var i = 0; i < dlkhjss.length; i++) {
ydwz_html += "<div><div>"+dlkhjss[i]+"</div></div>"
}
$("#dps #tydp-"+sh+" .-ydwz").html(ydwz_html)
}
})
}
})
}
function openTph(tyh) {
layer.open({
type: 2
,title: false
,closeBtn: 0
,content: 'tys_dpphbb.htm?tyh='+tyh
,area: ['90%', '400px']
})
}
function openKhs(dph) {
layer.open({
type: 2
,title: false
,closeBtn: 0
,content: 'tys_khdlbb.htm?dph='+dph
,area: ['90%', '400px']
})
}
function openJs(dph) {
layer.open({
type: 2
,title: false
,closeBtn: 0
,content: 'tys_dkzl.htm?dph='+dph
,area: ['90%', '400px']
})
}
</script>
</body>
</html>