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