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
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

504 lines
23 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>
body>* {padding-left: 10px;padding-right: 10px;}
.header {margin-top: 10px;}
.no-data {display: none; padding: 20px; color: #d0d0d0;}
#content #info .title{color: #9b9b9b; text-align: right;}
#content #info .text{font-weight: bold; text-align: left;}
#zjs .zj-ts {margin: 10px; box-sizing: border-box; float: left; border: solid 1px #d0d0d0;}
#zjs .zj-ts.zj-active {border: solid 1px #f04122;}
/* 这条css用于设置$(document).on(“click”,function(){})在iOS设备上无法作用的问题 */
#zjs .zj-ts {cursor: pointer}
.zj-shows {display: none;}
/* 自定义layui */
.layui-btn .layui-icon {margin-right: 0px;}
/* 自定义autocomplete */
.ac_results { box-sizing: border-box; border-radius: 5px;}
</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">
<!-- autocomplete -->
<script src="js/autocomplete/jquery-1.4.4.min.js"></script>
<script src="js/autocomplete/jquery.autocomplete.js"></script>
<link rel="stylesheet" href="js/autocomplete/jquery.autocomplete.css">
</head>
<body>
<!--头部 上下组 搜索-->
<div class="header">
<a href="javascript: setZs('tb_pre')" id="btn-prev" class="-btn-into" style="position: absolute; top: 0px; left: 20px;"><i class="layui-icon layui-icon-left"></i>上一组</a>
<div id="s-title-yph" class="layui-input-inline" style="width: 60px; position: relative;"><input id="wanted_yph" type="text" name="wanted_yph" placeholder="圆牌号" class="layui-input" style="border-radius:5px; padding-left: 0; text-align: center;"></div>
<div id="s-title-kh" class="layui-input-inline" style="width: 100px; position: relative;"><input id="wanted_kh" type="text" name="wanted_kh" placeholder="款号" class="layui-input" style="border-radius:5px; padding-left: 0; text-align: center;"></div>
<div id="s-title-dph" class="layui-input-inline" style="width: 60px; position: relative;"><input id="wanted_dph" type="text" name="wanted_dph" placeholder="搭配号" class="layui-input" style="border-radius:5px; padding-left: 0; text-align: center;"></div>
<a href="javascript: setZs('tb_next')" 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="zj-header layui-bg-gray">
<div class="no-data refresh"></div>
<div id="zjs" class="layui-row layui-col-space10 refresh"></div>
<hr class="layui-bg-gray">
<div id="tss" class="zj-tss layui-row layui-col-space10 refresh"></div>
<hr class="zj-tss layui-bg-gray">
<div class="zj-shows">
<a id="set-show" href="javascript:setShow()" class="layui-btn" style="background-color: #f04122; float: left;">将下列款设置为展示</a>
<div id="shows" class="layui-row"></div>
</div>
<hr class="zj-shows layui-bg-gray">
<script>
var is_mobile="n"
,ts_zj_data
,shows_data = ""
layui.config({
base: './layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'user', 'form'], function(){
var $ = layui.$
,setter = layui.setter
,admin = layui.admin
,form = layui.form
refresh()
// 监听,select
form.on("select(zt)", function(data) {
if (ts_zj_data.tid != data.value)
location.href = "zb_zj.htm?s_tid="+data.value
})
if(admin.screen()<2)
is_mobile="y"
$(window).on('resize', function(){
//自动
if(admin.screen()<2)
is_mobile="y"
})
})
function openD(kh,color,s_key){
layui.use(['form','layer','element'],function(){
var form = layui.form,
$ = layui.jquery;
var element = layui.element;
var layer = layui.layer;
var tt="";
if(color!="" && color!=undefined && color!=null){
tt=kh+"-"+color+"订单明细";
color1=color;
}else{
tt=kh+"订单明细";
color1='';
}
var index = layui.layer.open({
title : tt,
type : 2,
offset: 'auto',
area: ['700px', '600px'],
content : "order_report_openDetail.htm?kh="+kh+"&color="+color1+"&s_key="+s_key+"&s_group_by=4",
success : function(layero, index){
//
}
})
})
}
function openP(khid){
layui.use(['form','layer','element'],function(){
var form = layui.form,
$ = layui.jquery;
var element = layui.element;
var layer = layui.layer;
var tt="评价明细";
var index = layui.layer.open({
title : tt,
type : 2,
offset: 'auto',
area: ['700px', '600px'],
content : "zb_zj_pj.htm?khid="+khid,
success : function(layero, index){
//
}
})
})
}
//
function setZs(opt, zsh) {
layui.use(["jquery"], function() {
var $ = layui.$
,url = "./?_m=zb_zj&_a="+opt+(zsh ? "&zsh="+zsh : "")
//console.log(url)
if(opt=="del_zsh"){
layer.confirm('确定删除吗?', {icon: 3, title: '提示信息'}, function (index) {
$.ajax({
url: url
,success: function(res) {
var json_data = $.parseJSON(res)
console.log([opt, json_data])
if (json_data.code == 0) {
if (json_data.msg) layui.layer.msg(json_data.msg)
else layui.layer.msg("操作失败。")
} else if (json_data.code == 101) {
location.reload()
}
}
// ,beforeSend: function() { u_start_loading() }
// ,complete: function() { u_stop_loading() }
,error: function () { layui.layer.msg("与服务器通信失败!") }
})
});
}else{
$.ajax({
url: url
,success: function(res) {
var json_data = $.parseJSON(res)
console.log([opt, json_data])
if (json_data.code == 0) {
if (json_data.msg) layui.layer.msg(json_data.msg)
else layui.layer.msg("操作失败。")
} else if (json_data.code == 101) {
location.reload()
}
}
// ,beforeSend: function() { u_start_loading() }
// ,complete: function() { u_stop_loading() }
,error: function () { layui.layer.msg("与服务器通信失败!") }
})
}
})
}
function setShow(zsh) {
layui.use(["jquery"], function() {
var $ = layui.$
,url = "./?_m=zb_zj&_a=set_show&no="+shows_data+(zsh?"&s_zsh="+zsh:"")
console.log(url)
$.ajax({
url: url
,method: "POST"
,success: function(res) {
var json_data = $.parseJSON(res)
if (json_data.code == 101) {
location.reload()
} else if (json_data.code == 102) {
if (json_data.msg) layui.layer.msg()
else layui.layer.msg("操作失败。")
}
}
// ,beforeSend: function() { u_start_loading() }
// ,complete: function() { u_stop_loading() }
,error: function () { layui.layer.msg("与服务器通信失败!") }
})
})
}
$(function() {
// 自动补全
$('#wanted_yph').autocomplete("./?_m=zb_zj&_a=kh_color1", {
dataType: "json",//数据格式
max: 100, //列表里的条目数
minChars: 0, //自动完成激活之前填入的最小字符
width: 200, //提示的宽度,溢出隐藏
scrollHeight: 300, //提示的高度,溢出显示滚动条
matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
autoFill: false, //自动填充
multiple:false,
multipleSeparator:',',
parse: function (data) {
if (!data || data == null || data == "") {
alert("无数据");
return {};
}else{
return $.map(data.data, function (row) {
return {
data: row
,value: row.no+(row.color ? ","+row.color : "") // 传于result.formatted的值
,result: row.xh // 筛选依据
};
});
}
},
formatItem: function(row,i,max) { // 下拉显示内容
// console.log(["format item", row, i, max])
//提示的显示内容及格式设置
return (row.xh ? row.xh : "")+", "+(row.no ? row.no : "")+(row.color || row.colort ? ", "+row.color+"-"+row.colort:"")
},
formatMatch: function(row, i, max) {
// console.log(["format match", row, i, max])
return row.xh+(row.color ? ","+row.color : "")
},
formatResult: function(row) {
// console.log(["format result", row])
return ''
}
}).result(function(event, row, formatted){
// console.log(["result", event, row, formatted])
$(this).val(row.xh)
addKhShow("wanted_yph", formatted)
}) // end wanted-yph
$('#wanted_kh').autocomplete("./?_m=zb_zj&_a=kh_color", {
dataType: "json",//数据格式
max: 100, //列表里的条目数
minChars: 0, //自动完成激活之前填入的最小字符
width: 200, //提示的宽度,溢出隐藏
scrollHeight: 300, //提示的高度,溢出显示滚动条
matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
autoFill: false, //自动填充
multiple:false,
multipleSeparator:',',
parse: function (data) {
if (!data || data == null || data == "") {
alert("无数据");
return {};
}else{
return $.map(data.data, function (row) {
return {
data: row
,value: row.no+(row.color ? ","+row.color : "")
,result:row.no
};
});
}
},
formatItem: function(row,i,max) {
// console.log(["format item", row, i, max])
//提示的显示内容及格式设置
return (row.no ? row.no : "")+(row.color || row.colort ? ", "+row.color+"-"+row.colort:"")
},
formatMatch: function(row, i, max) {
// console.log(["format match", row, i, max])
return row.no+(row.color ? ","+row.color : "")
},
formatResult: function(row) {
// console.log(["format result", row])
return '';
}
}).result(function(event, row, formatted){
$(this).val(row.no)
addKhShow("wanted_kh", formatted)
}) // end wanted-kh
$('#wanted_dph').autocomplete("./?_m=zb_zj&_a=get_dph", {
dataType: "json",//数据格式
max: 100, //列表里的条目数
minChars: 0, //自动完成激活之前填入的最小字符
width: 200, //提示的宽度,溢出隐藏
scrollHeight: 300, //提示的高度,溢出显示滚动条
matchContains: true, //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
autoFill: false, //自动填充
multiple:false,
multipleSeparator:',',
parse: function (data) {
if (!data || data == null || data == "") {
alert("无数据")
return {}
}else{
return $.map(data.data, function (row) {
// console.log(row)
return {
data: row
,value: row.zsh
,result: row.title ? row.title : ""
}
})
}
},
formatItem: function(row,i,max) {
// console.log(["format item", row, i, max])
//提示的显示内容及格式设置
return row.title
},
formatMatch: function(row, i, max) {
// console.log(["format match", row, i, max])
return row.title;
},
formatResult: function(row) {
// console.log(["format result", row])
return '';
}
}).result(function(event, row, formatted){
// console.log(["result", event, row, formatted])
$(this).val(row.title)
addKhShow("wanted_dph", formatted)
}) // end wanted-dph
})
// 添加show
function addKhShow(input_id, formatted) {
var url = {
"wanted_yph": "./?_m=zb_zj&_a=tb_search&wanted_kh="+formatted
,"wanted_kh": "./?_m=zb_zj&_a=tb_search&wanted_kh="+formatted
,"wanted_dph": "./?_m=zb_zj&_a=tb_search_dp&s_zsh="+formatted
}
console.log(["url", url[input_id]])
$.ajax({
url: url[input_id]
,success: function(res) {
var json_data = $.parseJSON(res)
console.log(["add show", json_data])
var dkl = json_data.arr_dk.length
if (dkl == 0) {
layui.layer.msg("无对应的款,请核对后重新搜索。")
} else {
if (input_id == "wanted_dph") $("#set-show").attr("href", "javascript:setShow("+formatted+")")
$("#"+input_id).val("")
$(".zj-shows").show()
for (var i = 0; i < json_data.arr_dk.length; i++) {
var show = json_data.arr_dk[i]
,shows_html = ""
shows_data += (shows_data ? "," : "") + show.kh + "|" + show.color
shows_html += "<div class='kh_list-container layui-col-lg2 layui-col-md3 layui-col-sm3 layui-col-xs4 layui-col-xxs12' style='padding:5px;'>" // box
//----层1
shows_html += "<div style='width: 200px;height: 200px; line-height: 200px; position: relative;'><img src="+show.pic+" style='width:"+show.pic_w+"px; height:"+show.pic_h+"px;'>" // pic
shows_html += show.kh_dj ? "<div style='position: absolute; bottom: 0; right: 0; border: solid 1px black; width: 45px; height: 20px; line-height: 20px; font-size: 12px; background-color: #d0d0d0;'>"+show.kh_dj+"</div>" : ""
shows_html += "</div>"
//----end 层1
//----层2
shows_html += "<div style='text-align: center;'>"
shows_html += "<div class='layui-inline' style='width: 30%; 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: 10px;'>"+show.xh+"</div>" // xh
shows_html += "<div class='layui-inline' style='width: 70%;'>" // khid, price
shows_html += "<div class='layui-inline' style='width: 50%; text-align: left;'>"+show.kh+"</div><div class='layui-inline' style='width: 50%; text-align: center;'>¥"+show.price+"</div>"
shows_html += show.color || show.colort ? "<div class='layui-inline' style='width: 100%; text-align: left;'>"+show.color+"-"+show.colort+"</div>" : ""
shows_html += "</div>"
shows_html += "</div>"
//----end 层2
shows_html += "</div>"
$("#shows").append(shows_html)
}
}
}
// ,beforeSend: function() { u_start_loading() }
// ,complete: function() { u_stop_loading() }
,error: function () { layui.layer.msg("与服务器通信失败!") }
})
}
function refresh() {
console.log("刷新")
layui.use(["jquery", "form"], function() {
var $ = layui.$
,form = layui.form
var url = "./?_m=zb_zj"
$.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 (!ts_zj_data || ts_zj_data.zsh != json_data.zsh) {
console.log(["初始", json_data])
ts_zj_data = json_data
$(".refresh").html("")
/*if (json_data.zt.length) {
for (var i = 0; i < json_data.zt.length; i++) {
var zt = json_data.zt[i]
$("#zt").append("<option value='"+zt.no+"'"+(get_url_param("s_tid") == zt.no ? " selected" : "")+">"+zt.value+"</option>")
}
} else {
$(".zj-header").hide()
}*/
form.render() // 初始化form下的select控件
//------------主讲
var zjsl = json_data.zjs.length
if (zjsl == 0) {
$(".no-data").show()
if (json_data.msg) $(".no-data").html(json_data.msg)
else $(".no-data").html("暂无数据")
} else {
for (var i = 0; i < json_data.zjs.length; i++) {
var zj = json_data.zjs[i]
,zj_html =""
if (i == 0 && json_data.zsh == zj.tsh) $("#btn-prev").attr("href", "javascript:layui.layer.msg('已经是第一组了。')")
if (i == zjsl - 1 && json_data.zsh == zj.tsh) $("#btn-next").attr("href", "javascript:layui.layer.msg('已经是最后一组了。')")
zj_html += "<a"+(json_data.zsh != zj.tsh ? " href=\"javascript:setZs('tb_zsh', '"+zj.tsh+"')\"" : "")+" id='zj-"+zj.tsh+"' class='zj-ts"+(json_data.zsh == zj.tsh ? " zj-active" : "")+"' style='position: relative;'><div style='width: 120px; height: 120px; line-height: 120px;'>"
//--------层1
zj_html += "<img src='"+zj.pic+"' style='width: "+zj.pic_w+"px; height: "+zj.pic_h+"px;'>" //推送 图片
zj_html += "</div>"
//--------层1.5
zj_html += "<div style='position: absolute; top: 0; left: 0; border-right: solid 1px #d0d0d0; border-bottom: solid 1px #d0d0d0; border-top: none; border-left: none; border-radius: 0 0 2px 0; width: 45px; height: 21px; line-height: 21px; font-size: 14px; background-color: white;'>"+zj.title+"</div>" // 推送号
zj_html += "<button class='zj-del layui-btn layui-btn-xs layui-btn-primary' style='position: absolute; top: 0; right: 0; border-left: solid 1px #d0d0d0; border-bottom: solid 1px #d0d0d0; border-top: none; border-right: none; border-radius: 0 0 0 2px;' onclick=\"setZs('del_zsh', '"+zj.tsh+"');return true;\"><i class='layui-icon'>&#x1006;</i></button>" // 关闭按钮 //--------层1.5
//--------end 层1.5
//--------层2
zj_html += "<div style='width: 120px; height: 100px; overflow-y: auto; overflow-x: hidden; background-color: #f5f5f5; padding-bottom: 20px;'>"+zj.info+"</div>"
zj_html += "</a>"
$("#zjs").append(zj_html)
}
}
//------------推送
if (!json_data.zsh) {
$(".zj-tss").hide()
} else {
for (var j = 0; j < json_data.tsz.length; j++) {
var ts = json_data.tsz[j]
,tss_html = ""
tss_html += "<div class='kh_list-container layui-col-lg2 layui-col-md3 layui-col-sm3 layui-col-xs4 layui-col-xxs12' style='padding:5px;'>" // box
//----层1
tss_html += "<div style='width: 200px;height: 200px; line-height: 200px; position: relative;'><img src="+ts.pic+" style='width:"+ts.pic_w+"px; height:"+ts.pic_h+"px;'>" // pic
tss_html += ts.kh_dj ? "<div style='position: absolute; bottom: 0; right: 0; border: solid 1px black; width: 45px; height: 20px; line-height: 20px; font-size: 12px; background-color: #d0d0d0;'>"+ts.kh_dj+"</div>" : ""
tss_html += "</div>"
//----end 层1
//----层2
tss_html += "<div style='text-align: center;'>"
tss_html += "<div class='layui-inline' style='width: 30%; 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: 10px;'>"+ts.xh+"</div>" // xh
tss_html += "<div class='layui-inline' style='width: 70%;'>" // khid, price
tss_html += "<div class='layui-inline' style='width: 50%; text-align: left;'>"+ts.kh+"</div><div class='layui-inline' style='width: 50%; text-align: center;'>¥"+ts.price+"</div>"
tss_html += ts.color || ts.colort ? "<div class='layui-inline' style='width: 100%; text-align: left;'>"+ts.color+"-"+ts.colort+"</div>" : ""
tss_html += "</div>"
tss_html += "</div>"
//----end 层2
//----层3
tss_html += "<div style='text-align: center;'>"
tss_html += "<div>订单:<a style=\"color:blue;\" onclick=\"openD('"+ts.kh+"','"+ts.color+"','')\">"+ts.order_num+"件/"+ts.order_clients+"人</a></div>"
tss_html += "<div>评价:<a style=\"color:blue;\" onclick=\"openP('"+ts.khid+"')\">"+ts.ppf+"分/"+ts.pj_clients+"人</a></div>"
tss_html += "</div>"
//----end 层3
tss_html += "</div>"
$("#tss").append(tss_html)
}
}
//}
setTimeout("refresh()", 5000)
}
}
// ,beforeSend: function() { u_start_loading() }
// ,complete: function() { u_stop_loading() }
,error: function () { layui.layer.msg("与服务器通信失败!") }
})
})
}
</script>
</body>
</html>