7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
1154 lines
36 KiB
HTML
1154 lines
36 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">
|
|
<script src="layuiadmin/layui/layui.js"></script>
|
|
<script src="js/function.js"></script>
|
|
<script>
|
|
function u_close_this_div(){
|
|
layui.use('layer', function(){
|
|
var index = parent.layer.getFrameIndex(window.name);
|
|
parent.layer.close(index);
|
|
});
|
|
}
|
|
</script>
|
|
<style>
|
|
/* 顶部标题栏 */
|
|
.state_bar {
|
|
height: 45px;
|
|
line-height: 45px;
|
|
background-color: #f8f8f8;
|
|
border: 1px solid #eee;
|
|
margin-bottom: 10px;
|
|
}
|
|
.state_bar .text_title {
|
|
width: 100px;
|
|
float: left;
|
|
font-size: 16px;
|
|
}
|
|
.state_bar .btn_close {
|
|
width: 40px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
float: right;
|
|
cursor: pointer;
|
|
text-align: center;
|
|
}
|
|
/* 顶部操作栏 */
|
|
/* 自由陈列模版 */
|
|
.zycl_mb_title_selected{
|
|
background-color:#cccccc;border:1px solid #000000;border-right:0px;font-size:14px;font-weight:bold;cursor:pointer;
|
|
}
|
|
.zycl_mb_title_normal{
|
|
background-color:#ffffff;border:1px solid #cccccc;border-right:0px;font-size:14px;font-weight:normal;cursor:pointer;
|
|
}
|
|
.zycl_wzh_normal{
|
|
border:1px solid #cccccc;font-size:14px;font-weight:normal;cursor:pointer;
|
|
}
|
|
.zycl_wzh_selected{
|
|
border:1px solid #0000ff;font-size:14px;font-weight:bold;cursor:pointer;
|
|
}
|
|
/* 自由陈列模版 */
|
|
</style>
|
|
</head>
|
|
<body style="background-color:#fff;">
|
|
<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="layui-fluid" style="padding:0;">
|
|
<div class="layui-row" id="searh_zycl" style="margin-top:10px;">
|
|
<form method="post" name="form1" id="form1" class="layui-form">
|
|
<input type="hidden" name="_a" value="save"/>
|
|
<input type="hidden" id="str_yc" name="str_yc" value="" />
|
|
<input type="hidden" id="zsh" name="zsh" value="" />
|
|
<input type="hidden" id="mb" name="mb" value="" />
|
|
<input type="hidden" id="str_pic_zz" name="str_pic_zz" value="" />
|
|
<input type="hidden" id="sub_bxk" name="sub_bxk" value="" />
|
|
<input type="hidden" id="remark" name="remark" value="" />
|
|
<div class="layui-input-inline">陈列号</div>
|
|
<div class="layui-input-inline" id="divclh"><input type="text" class="layui-input" style="width:100px" id="clh" name="clh" value=""></div>
|
|
<div class="layui-input-inline"><a class="layui-btn layui-btn-normal" href="javascript:void(0);" lay-submit lay-filter="form1_submit">保 存</a></div>
|
|
</form>
|
|
</div><hr>
|
|
|
|
<div class="layui-row" id="content_zycl">
|
|
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
|
<tr>
|
|
<td valign="top" height="300">
|
|
<table cellspacing="0" cellpadding="0" border="0">
|
|
<tr>
|
|
<td width="100" valign="top">
|
|
<div id="select_mb">
|
|
|
|
</div>
|
|
</td>
|
|
<td width="460" valign="top" height="335">
|
|
<div id="div_mt">
|
|
|
|
</div>
|
|
</td>
|
|
<td width="150" valign="top">
|
|
<div id="remark">
|
|
<textarea name="text_remark" id="text_remark" rows="20" style="width:150px;" placeholder="文字说明"></textarea>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div><hr>
|
|
<div class="layui-row" id="div_yc"></div>
|
|
<div class="layui-row" id="td_bxk" style="display:none;">
|
|
<div style="border:1px solid #cccccc;">
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
<tr>
|
|
<td width="30" align="middle" valign="middle">
|
|
<img src="images/button_bxk.png" width="25" height="84">
|
|
</td>
|
|
<td id="div_bxk"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
|
|
<div class="layui-row" id="searh_zycl2">
|
|
<form action="./?_m=zycl&_a=kh_list" method="post" name="form2" id="form2" class="layui-form" onsubmit="return true;" target="kh_list_frame">
|
|
<div class="layui-input-inline" style="float:left;margin-left:5px;"><input class="layui-input" type="text" placeholder="圆牌号" style="width:100px" id="s_xh" name="s_xh" value="" /> </div>
|
|
<div class="layui-input-inline" style="float:left;margin-left:5px;" id="search_after"><input class="layui-input" type="text" placeholder="款号" style="width:100px" id="s_no" name="s_no" value="" /> </div>
|
|
<div class="layui-input-inline" style="float:left;margin-left:5px;"><input class="layui-btn" id="s_search" name="s_search" type="submit" value="搜索"></div>
|
|
<div class="layui-input-inline" style="float:left;margin-left:5px;line-height:38px;"><a class="layui-btn layui-btn-normal" href="javascript:void(0);" onclick="check_b('s_is_ordered');document.getElementById('form2').submit();" id="div_s_is_ordered">已订款</a><input type="hidden" id="s_is_ordered" name="s_is_ordered" value="n"></div>
|
|
<div class="layui-input-inline" style="float:left;margin-left:5px;">
|
|
<a href="javascript:do_smll()">
|
|
<img src="images/button_smll.png" style="width:90px;height:38px">
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
<div>
|
|
<div class="layui-row" id="content_zydp_list" style="height:500px">
|
|
<iframe name="kh_list_frame" height="100%" scrolling="no" width="100%" frameborder="0" border="0" style="marging:0px;padding:0px;position: static;" src="./?_m=zycl&_a=kh_list"></iframe>
|
|
<div>
|
|
<div id="div_smll" style="z-index:10000;position:absolute;top:0px;left:0px;display:none;width:100%;height:800px;" align="center">
|
|
<div style="z-index:10002;width:90%;background-color:#e9e9e9;border-left:1px solid #999999;border-right:1px solid #999999;border-top:1px solid #999999;" align="right">
|
|
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
<td height="40" align="left" style="font-size:16px;font-weight:bold;"> 扫描录入</td>
|
|
<td width="40" onclick="close_smll();" style="cursor:pointer;" align="center">
|
|
<img src="images/close.gif" width="24" height="24">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div style="z-index:10001;width:90%;background-color:#cccccc;border:1px solid #999999;height:600px;" align="center">
|
|
<iframe id="msll_frame" name="msll_frame" height="600px" scrolling="no" width="100%" frameborder="0" border="0" style="marging:0px;padding:0px;position: static;" src="about:blank;"></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
<script>
|
|
var arr_mb;
|
|
var str_bxk;
|
|
var str_yc="";
|
|
var selected_wzh="";
|
|
var arr_this_mb=[];
|
|
var arr_this_wzh=[];
|
|
var mb="";
|
|
var sys_zycl_dress_level="";
|
|
var zen1_pic_path="";
|
|
var zen2_pic_path="";
|
|
var sys_zycl_xz_top="";
|
|
var gan_pic_path="";
|
|
var sys_zycl_sjbl="";
|
|
//
|
|
var is_mobile="n";
|
|
layui.config({
|
|
base: './layuiadmin/'
|
|
}).extend({
|
|
index: 'lib/index'
|
|
}).use(['index','form','user','rate','element'], function(){
|
|
var $ = layui.$
|
|
,setter = layui.setter
|
|
,admin = layui.admin
|
|
,form = layui.form;
|
|
var rate = layui.rate;
|
|
var element = layui.element;
|
|
|
|
//取得url传递参数
|
|
var query_str=location.search.substring(1);
|
|
if(query_str)
|
|
query_str="&"+query_str;
|
|
var url="./?_m=zycl"+query_str;
|
|
|
|
$.ajax(
|
|
{
|
|
url:url,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
success: function (res) {
|
|
var res=$.parseJSON(res);
|
|
|
|
//自定义选项
|
|
var html1="";
|
|
for(var i=0;i<res.select_zdy.length;i++){
|
|
html1+='<div class="layui-inline" style="width:100px;"><select name="'+res.select_zdy[i].no+'"><option value="">-'+res.select_zdy[i].title+'-</option>';
|
|
var op=res.select_zdy[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html1+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_zdy[i].value)
|
|
html1+='selected';
|
|
html1+='>'+op[j].title+'</option>';
|
|
}
|
|
html1+='</select></div>';
|
|
}
|
|
$("#divclh").after(html1);
|
|
//
|
|
var html1="";
|
|
for(var i=0;i<res.select_dz.length;i++){
|
|
html1+='<div class="layui-inline" style="float:left;margin-left:5px;width:100px;"><select name="'+res.select_dz[i].no+'"><option value="">-'+res.select_dz[i].title+'-</option>';
|
|
var op=res.select_dz[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html1+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_dz[i].value)
|
|
html1+='selected';
|
|
html1+='>'+op[j].title+'</option>';
|
|
}
|
|
html1+='</select></div>';
|
|
}
|
|
$("#search_after").after(html1);
|
|
//
|
|
$("#str_yc").val(res.str_yc);
|
|
$("#zsh").val(res.zsh);
|
|
$("#mb").val(res.mb);
|
|
if(res.mb!=""){
|
|
$("#str_pic_zz").val(res.str_pic_zz);
|
|
$("#remark").val(res.remark);
|
|
$("#text_remark").val(res.remark);
|
|
$("#clh").val(res.clh);
|
|
form.render();
|
|
//全局赋值
|
|
str_yc=res.str_yc;
|
|
arr_mb=res.arr_mb;
|
|
mb=res.mb;
|
|
sys_zycl_dress_level=res.sys_zycl_dress_level;
|
|
zen1_pic_path=res.zen1_pic_path;
|
|
zen2_pic_path=res.zen2_pic_path;
|
|
sys_zycl_xz_top=res.sys_zycl_xz_top;
|
|
gan_pic_path=res.gan_pic_path;
|
|
sys_zycl_sjbl=res.sys_zycl_sjbl;
|
|
//
|
|
if(arr_mb.length>1){
|
|
var arr_tmp=[];
|
|
var arr_tmp1=[];
|
|
var sty="";
|
|
var html1="";
|
|
html1+='<table cellspacing="0" cellpadding="0" border="0">';
|
|
html1+='<tr><td align="right"><img src="images/button_cl_xzmb.png" width="70" height="30"></td></tr>';
|
|
html1+='<tr><td width="100" align="right"><table cellspacing="0" cellpadding="2" border="0">';
|
|
|
|
for(var i=0;i<arr_mb.length;i++){
|
|
arr_tmp=arr_mb[i].split("|");
|
|
arr_tmp1=arr_tmp[0].split(",");
|
|
sty=(mb==arr_tmp1[0])?"zycl_mb_title_selected":"zycl_mb_title_normal";
|
|
html1+="<tr><td height=\"25\" id=\"s_mb_"+arr_tmp1[0]+"\" align=\"center\" class=\""+sty+"\" onclick=\"change_mb('"+arr_tmp1[0]+"')\">"+arr_tmp1[1]+"</td></tr>";
|
|
}
|
|
html1+='</table></td></tr>';
|
|
html1+='</table>';
|
|
$("#select_mb").html(html1);
|
|
}
|
|
str_bxk=res.str_bxk;
|
|
//
|
|
var arr_tmp=[];
|
|
for(var i=0;i<arr_mb.length;i++){
|
|
arr_tmp=arr_mb[i].split("|");
|
|
arr_tmp=arr_tmp[0].split(",");
|
|
if(arr_tmp[0]==mb){
|
|
arr_this_mb=arr_mb[i].split("|");
|
|
break;
|
|
}
|
|
}
|
|
arr_this_wzh=arr_this_mb[1].split(",");
|
|
re_dress('');
|
|
put_bxk();
|
|
dress_all();
|
|
}else{
|
|
alert("陈列模板不能为空!");
|
|
}
|
|
}
|
|
}
|
|
);
|
|
form.on("submit(form1_submit)",function(data){
|
|
if(str_yc){
|
|
document.getElementById("str_yc").value=str_yc;
|
|
var str_pic_zz="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(get_zz_level(arr_this_wzh[i])>0)
|
|
str_pic_zz+=mb+"_"+arr_this_wzh[i]+"_zz,";
|
|
}
|
|
if(str_pic_zz!="")
|
|
str_pic_zz=str_pic_zz.substring(0,str_pic_zz.length-1);
|
|
document.getElementById("str_pic_zz").value=str_pic_zz;
|
|
//处理被选款
|
|
if(str_bxk!=""){
|
|
var arr_bxk=str_bxk.split(",");
|
|
str_bxk="";
|
|
for(var i=0;i<arr_bxk.length;i++){
|
|
if(arr_bxk[i]!=""){
|
|
var arr_tmp=arr_bxk[i].split("|");
|
|
str_bxk+=arr_tmp[3]+",";
|
|
}
|
|
}
|
|
str_bxk=str_bxk.substring(0,str_bxk.length-1);
|
|
document.getElementById("sub_bxk").value=str_bxk;
|
|
}
|
|
document.getElementById("remark").value=document.getElementById("text_remark").value;
|
|
document.getElementById("mb").value=mb;
|
|
var data1 = $("#form1").serialize();
|
|
//console.log(str_yc);
|
|
$.ajax(
|
|
{
|
|
url:"./?_m=zycl",
|
|
contentType: "application/json",
|
|
method: 'get',
|
|
data:data1,
|
|
success: function (res) {
|
|
var res=$.parseJSON(res);
|
|
if(res.cate=="saveback"){
|
|
parent.layui.layer.msg("保存成功!");
|
|
//parent.reload();
|
|
//location.href="zydp.htm";
|
|
parent.frames["layadmin-iframe"].location.reload();
|
|
var index = parent.layer.getFrameIndex(window.name);
|
|
parent.layer.close(index);
|
|
}
|
|
},
|
|
error: function () {
|
|
parent.layui.layer.msg("与服务器通信失败!");
|
|
}
|
|
});
|
|
return false;
|
|
}else{
|
|
alert("没有任何数据!");
|
|
return false;
|
|
}
|
|
});
|
|
|
|
});
|
|
//
|
|
function do_smll(){
|
|
var url="./?_m=zycl&_a=smll&mb="+mb+"&wzh="+selected_wzh+"&str_yc_old="+escape(str_yc)+"&str_bxk_old="+escape(str_bxk);
|
|
document.getElementById("msll_frame").src=url;
|
|
document.getElementById("div_smll").style.display="";
|
|
}
|
|
function close_smll(){
|
|
document.getElementById('div_smll').style.display='none';
|
|
document.getElementById('msll_frame').src='about:blank';
|
|
}
|
|
//
|
|
function check_b(n1){
|
|
var obj=document.getElementById(n1);
|
|
var obj1=document.getElementById("div_"+n1);
|
|
if(obj.value=="y"){
|
|
obj.value="n";
|
|
obj1.className="layui-btn layui-btn-normal";
|
|
}else{
|
|
obj.value="y";
|
|
obj1.className="layui-btn layui-btn-danger";
|
|
}
|
|
}
|
|
//
|
|
function dress_all(){
|
|
if(str_yc!=""){
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
re_dress(arr_this_wzh[i]);
|
|
}
|
|
}
|
|
}
|
|
//
|
|
function in_bxk(l,pic,pic_prop,ks,color,gan_pic_w){
|
|
|
|
//判断是否已备选
|
|
var bxk="";
|
|
if(str_bxk!=""){
|
|
var arr_bxk=str_bxk.split(",");
|
|
for(var i=0;i<arr_bxk.length;i++){
|
|
if(arr_bxk[i]!=""){
|
|
var arr_tmp=arr_bxk[i].split("|");
|
|
if(arr_tmp[3]==ks){
|
|
alert("该款已备选!");
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
bxk=",";
|
|
}
|
|
//处理被选款
|
|
str_bxk+=bxk+l+"|"+pic+"|"+pic_prop+"|"+ks+"|"+color+"|"+gan_pic_w;
|
|
put_bxk();
|
|
}
|
|
//删除被选款
|
|
function del_bxk(ks){
|
|
var arr_bxk=str_bxk.split(",");
|
|
str_bxk="";
|
|
for(var i=0;i<arr_bxk.length;i++){
|
|
if(arr_bxk[i]!=""){
|
|
var arr_tmp=arr_bxk[i].split("|");
|
|
if(arr_tmp[3]!=ks){
|
|
str_bxk+=arr_tmp[0]+"|"+arr_tmp[1]+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+",";
|
|
}
|
|
}
|
|
}
|
|
if(str_bxk)
|
|
str_bxk=str_bxk.substring(0,str_bxk.length-1);
|
|
put_bxk();
|
|
}
|
|
//
|
|
function put_bxk(){
|
|
var obj=document.getElementById("div_bxk");
|
|
var obj1=document.getElementById("td_bxk");
|
|
if(str_bxk!=""){
|
|
var arr_bxk=str_bxk.split(",");
|
|
var html_bxk="";
|
|
for(var i=0;i<arr_bxk.length;i++){
|
|
if(arr_bxk[i]!=""){
|
|
var arr_tmp=arr_bxk[i].split("|");
|
|
html_bxk+=get_bxk_html(arr_tmp[0],arr_tmp[1],arr_tmp[2],arr_tmp[3],arr_tmp[4],arr_tmp[5]);
|
|
}
|
|
}
|
|
obj.innerHTML=html_bxk;
|
|
obj1.style.display="";
|
|
}else{
|
|
obj.innerHTML=" ";
|
|
obj1.style.display="none";
|
|
}
|
|
}
|
|
//
|
|
function get_bxk_html(l,pic,pic_prop,ks,color,gan_pic_w){
|
|
var arr_tmp=ks.split("&");
|
|
var pic_mini="../attachments/zycl/mini/"+pic+".jpg";
|
|
var t1=ks.replace(/&/g,",");
|
|
var html1="<div id=\"bxk_"+ks+"\" style=\"float:left;padding:2px;\"><table><tr><td align=\"center\"><img src='"+pic_mini+"'"+pic_prop+" onclick=\"dress_up("+l+",'"+pic+"','"+pic_prop+"','"+ks+"','1','"+gan_pic_w+"');\" style=\"cursor:pointer;\" watermark></td></tr><tr><td>"+t1+" <a href=\"javascript:del_bxk('"+ks+"');\"><img src=\"images/button_zycl_yc.png\" align=\"middle\" border=0></a></td></tr></table></div>";
|
|
return html1;
|
|
}
|
|
//更换模板
|
|
function change_mb(t){
|
|
var arr_tmp=[];
|
|
var arr_tmp1=[];
|
|
if(t==mb){
|
|
return "";
|
|
}else{
|
|
if(str_yc!==""){
|
|
var a=confirm("更换模板需要重新陈列,确认吗?");
|
|
if(a==false){
|
|
return;
|
|
}
|
|
}
|
|
str_yc="";
|
|
mb=t;
|
|
//处理选择模板的tab
|
|
for(var i=0;i<arr_mb.length;i++){
|
|
arr_tmp=arr_mb[i].split("|");
|
|
arr_tmp1=arr_tmp[0].split(",");
|
|
obj1=document.getElementById("s_mb_"+arr_tmp1[0]);
|
|
if(arr_tmp1[0]==t)
|
|
obj1.className="zycl_mb_title_selected";
|
|
else
|
|
obj1.className="zycl_mb_title_normal";
|
|
}
|
|
//取得选定模板
|
|
var arr_tmp=[];
|
|
for(var i=0;i<arr_mb.length;i++){
|
|
arr_tmp=arr_mb[i].split("|");
|
|
arr_tmp=arr_tmp[0].split(",");
|
|
if(arr_tmp[0]==mb){
|
|
arr_this_mb=arr_mb[i].split("|");
|
|
break;
|
|
}
|
|
}
|
|
arr_this_wzh=arr_this_mb[1].split(",");
|
|
selected_wzh=arr_this_wzh[0];
|
|
re_dress('');
|
|
}
|
|
}
|
|
//
|
|
function re_dress(wzh){
|
|
var arr_this_map_rec=arr_this_mb[3].split(",");
|
|
var arr_this_wzh=arr_this_mb[1].split(",");
|
|
if(wzh==""){
|
|
//首次陈列
|
|
if(selected_wzh==""){
|
|
selected_wzh=arr_this_wzh[0];
|
|
}
|
|
var obj_mt=document.getElementById("div_mt");
|
|
var obj_yc=document.getElementById("div_yc");
|
|
var html_mt="<div id=\"mb\" style=\"z-index:1;position:relative;\"><img src=\"../attachments/zycl/"+mb+".jpg\" watermark>";
|
|
var html_yc=cla="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh.length>1){
|
|
cla=(arr_this_wzh[i]==selected_wzh)?"zycl_wzh_selected":"zycl_wzh_normal";
|
|
}
|
|
html_mt+="<div id=\"div_wz_"+arr_this_wzh[i]+"\" style=\"z-index:10;position:absolute;left:"+arr_this_map_rec[i*4]+"px;top:"+arr_this_map_rec[i*4+1]+"px;width:"+(arr_this_map_rec[i*4+2]-arr_this_map_rec[i*4])+"px;height:"+(arr_this_map_rec[i*4+3]-arr_this_map_rec[i*4+1])+"px;\" align=\"center\" class=\""+cla+"\" onclick=\"change_wzh('"+arr_this_wzh[i]+"')\">";
|
|
if(arr_this_wzh.length>1)
|
|
html_mt+="<div style=\"position:absolute;top:-20px;background-color:#cccccc;line-height:18px;\"> "+arr_this_wzh[i]+" </div>";
|
|
html_mt+="<div id=\"cl_"+arr_this_wzh[i]+"\" style=\"position:absolute;top:0px;left:0px;width:"+(arr_this_map_rec[i*4+2]-arr_this_map_rec[i*4])+"px;\" align=\"center\"></div></div>";
|
|
}
|
|
html_mt+="</div>";
|
|
var title_wzh="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh.length>1)
|
|
title_wzh="<div style=\"background-color:#cccccc;line-height:20px;float:left;\" align=\"center\" width=\"50\"> "+arr_this_wzh[i]+" </div>";
|
|
html_yc+="<div style=\"float:left;border:1px solid #cccccc;padding:2px;margin:2px;\">"+title_wzh+"<div id=\"yc_"+arr_this_wzh[i]+"\" style=\"float:left;\"></div></div>";
|
|
}
|
|
obj_mt.innerHTML=html_mt;
|
|
obj_yc.innerHTML=html_yc;
|
|
}else{
|
|
//特定位置陈列
|
|
var obj_wz_cl=document.getElementById("cl_"+wzh);
|
|
var obj_wz_yc=document.getElementById("yc_"+wzh);
|
|
obj_wz_cl.innerHTML="";
|
|
obj_wz_yc.innerHTML="";
|
|
var arr_yc=str_yc.split(",");
|
|
//取得侧挂杆的总宽度
|
|
var arr_tmp_pic_path=arr_this_mb[2].split(",");
|
|
var ind_gan=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_gan=i;
|
|
}
|
|
var gan_width=arr_this_map_rec[ind_gan*4+2]-arr_this_map_rec[ind_gan*4];
|
|
//计算所有侧挂图的总宽度
|
|
var gan_pic_width=0;
|
|
var gan_pic_num=0;
|
|
var last_pic_width=first_pic_width=0;
|
|
var sj_pic_width=0;
|
|
var i1=0;
|
|
for(var i=0;i<arr_yc.length;i++){
|
|
arr_tmp=arr_yc[i].split("|");
|
|
if(arr_tmp[0]==wzh){
|
|
gan_pic_width+=parseInt(arr_tmp[7]*(1-sys_zycl_sjbl))*parseInt(arr_tmp[6]);
|
|
gan_pic_num+=parseInt(arr_tmp[6]);
|
|
sj_pic_width+=parseInt(arr_tmp[7])*parseInt(arr_tmp[6]);
|
|
if(i1==0)
|
|
first_pic_width=parseInt(arr_tmp[7]);
|
|
last_pic_width=parseInt(arr_tmp[7]);
|
|
i1++;
|
|
}
|
|
}
|
|
if(gan_pic_width>0){
|
|
gan_pic_width+=last_pic_width*sys_zycl_sjbl;
|
|
sj_pic_width-=first_pic_width;
|
|
}
|
|
//
|
|
//alert(gan_pic_width+","+gan_width+","+sj_pic_width);
|
|
var str_div_yc=str_div_mt=pic_big=pic_mini=pic_url="";
|
|
var arr_tmp=[];
|
|
var tmp_html_cl=tmp_html_yc="";
|
|
var gan_l=0;
|
|
var c_zIndex=1000;
|
|
for(var i=0,list_sz=0;i<arr_yc.length;i++){
|
|
arr_tmp=arr_yc[i].split("|");
|
|
if(wzh==arr_tmp[0]){
|
|
//存在图片
|
|
var pic_path1=get_cl_pic_big_path(arr_tmp[0],list_sz);
|
|
pic_big="../attachments/zycl/"+pic_path1+"/"+arr_tmp[3]+".png";
|
|
pic_mini="../attachments/zycl/mini/"+arr_tmp[3]+".jpg";
|
|
var title_yc=arr_tmp[3].replace(/_/g,",");
|
|
//定义各类型图片是否存在
|
|
var arr_exist_pic=arr_tmp[8].split("&");
|
|
var exist_pic_c=arr_exist_pic[2];
|
|
var exist_pic_z=arr_exist_pic[0];
|
|
if(pic_path1==zen2_pic_path)
|
|
exist_pic_z=arr_exist_pic[1];
|
|
//
|
|
if(get_pic_path(arr_tmp[0])=="gan"){
|
|
//--------------------------------------------------------侧挂陈列
|
|
if(arr_tmp[3]){
|
|
//存在图片才正式陈列
|
|
for(var j=0;j<arr_tmp[6];j++){
|
|
if(exist_pic_c=="y"){
|
|
obj_wz_cl.innerHTML+="<div style=\"position:absolute;left:"+gan_l+"px;z-index:"+c_zIndex+";\"><img src=\""+pic_big+"\" watermark></div>";
|
|
gan_l+=parseInt(arr_tmp[7])-parseInt(arr_tmp[7])*sys_zycl_sjbl-count_gan_pic_die_num(gan_width,gan_pic_width,sj_pic_width,arr_tmp[7]);
|
|
c_zIndex--;
|
|
}
|
|
}
|
|
}
|
|
button_yc="<a href=\"javascript:dress_down('"+wzh+"',"+arr_tmp[1]+")\"><img src=\"images/button_zycl_yc.png\" width=\"30\" height=\"24\" border=0></a>";
|
|
if(arr_tmp[6]==1)
|
|
button_yc+="<a href=\"javascript:deel_js('"+wzh+"',"+arr_tmp[1]+",2)\"><img src=\"images/button_zycl_sj.png\" width=\"30\" height=\"24\" border=0></a>";
|
|
else
|
|
button_yc+="<a href=\"javascript:deel_js('"+wzh+"',"+arr_tmp[1]+",1)\"><img src=\"images/button_zycl_dj.png\" width=\"30\" height=\"24\" border=0></a>";
|
|
//往左移动
|
|
var button_arrow="";
|
|
if(check_left(arr_tmp[0],arr_tmp[1])=="y")
|
|
button_arrow+="<a href=\"javascript:dress_left('"+arr_tmp[0]+"',"+arr_tmp[1]+")\"><img src=\"images/button_zycl_left.png\" width=\"30\" height=\"24\" border=0></a>";
|
|
//往右移动
|
|
if(check_right(arr_tmp[0],arr_tmp[1])=="y")
|
|
button_arrow+="<a href=\"javascript:dress_right('"+arr_tmp[0]+"',"+arr_tmp[1]+")\"><img src=\"images/button_zycl_right.png\" width=\"30\" height=\"24\" border=0>";
|
|
}else{
|
|
//--------------------------------------------------------正挂陈列
|
|
if(arr_tmp[3]){
|
|
// alert(arr_tmp[2]);
|
|
if(exist_pic_z=="y"){
|
|
//存在图片才正式成列
|
|
if(parseInt(arr_tmp[2])>=10 && parseInt(arr_tmp[2])<=20){
|
|
//下装
|
|
obj_wz_cl.innerHTML+="<div style=\"z-index:"+(arr_tmp[2]*10)+";position:absolute;top:"+sys_zycl_xz_top+"px;width:100%;\" align=\"center\"><img src=\""+pic_big+"\" watermark></div>";
|
|
}else{
|
|
//上装
|
|
obj_wz_cl.innerHTML+="<div style=\"z-index:"+(arr_tmp[2]*10)+";position:absolute;top:0px;width:100%;\" align=\"center\"><img src=\""+pic_big+"\" watermark></div>";
|
|
list_sz++;
|
|
}
|
|
}
|
|
}
|
|
button_yc="<a href=\"javascript:dress_down('"+wzh+"',"+arr_tmp[1]+")\"><img src=\"images/button_zycl_yc.png\" width=\"30\" height=\"24\" border=0></a>";
|
|
var button_arrow="";
|
|
}
|
|
//已穿
|
|
obj_wz_yc.innerHTML+="<div style=\"width:122px;margin:2px;float:left;\"><div align=\"center\"><img src=\""+pic_mini+"\" "+arr_tmp[4]+" watermark></div><div align=\"center\">"+title_yc+"</div><div align=\"center\">"+button_arrow+button_yc+"</div>";
|
|
}
|
|
}
|
|
if(get_pic_path(arr_tmp[0])!="gan"){
|
|
//加入遮罩层
|
|
var zz_level=get_zz_level(wzh);
|
|
if(zz_level>0)
|
|
obj_wz_cl.innerHTML+="<div style=\"z-index:"+(zz_level*10+1)+";position:absolute;top:0px;width:100%;\" align=\"center\"><img src=\"../attachments/zycl/"+mb+"_"+wzh+"_zz.png\" watermark></div>";
|
|
}
|
|
}
|
|
}
|
|
//取得遮罩层
|
|
function get_zz_level(wzh){
|
|
wzh=wzh?wzh:selected_wzh;
|
|
var zz_level=0;
|
|
if(str_yc!=""){
|
|
var arr_yc=str_yc.split(",");
|
|
if(get_pic_path(wzh)!="gan"){
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
var arr_level=[];
|
|
var arr_exist_pic=[];
|
|
for(var i=0,i1=0;i<arr_this_wz_yc.length;i++){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(arr_tmp[2]>=20 && arr_tmp[2]<=30 && arr_tmp[3]!=""){
|
|
arr_exist_pic=arr_tmp[8].split("&");
|
|
var exist_pic_z=arr_exist_pic[0];
|
|
var pic_path1=get_cl_pic_big_path(arr_tmp[0],i1);
|
|
if(pic_path1==zen2_pic_path)
|
|
exist_pic_z=arr_exist_pic[1];
|
|
if(exist_pic_z=="y"){
|
|
arr_level[i1]=arr_tmp[2];
|
|
i1++;
|
|
}
|
|
}
|
|
}
|
|
if(arr_level.length>1){
|
|
arr_level.sort(function(a,b){return a>b?1:-1});
|
|
zz_level=arr_level[arr_level.length-2];
|
|
}
|
|
}
|
|
}
|
|
return parseInt(zz_level);
|
|
}
|
|
//
|
|
function get_cl_pic_big_path(wzh,list){
|
|
var arr_tmp_wzh=arr_this_mb[1].split(",");
|
|
var arr_tmp_pic_path=arr_this_mb[2].split(",");
|
|
var ind=0;
|
|
var r="";
|
|
for(var i=0;i<arr_tmp_wzh.length;i++){
|
|
if(arr_tmp_wzh[i]==wzh){
|
|
ind=i;
|
|
break;
|
|
}
|
|
}
|
|
if(get_pic_path(wzh)=="gan"){
|
|
//侧挂
|
|
r=gan_pic_path;
|
|
}else{
|
|
if(list==0){
|
|
//正挂第一张
|
|
r=zen1_pic_path;
|
|
}else{
|
|
//正挂叠装
|
|
r=zen2_pic_path;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
//更换位置
|
|
function change_wzh(wzh){
|
|
selected_wzh=wzh;
|
|
var obj1={};
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
obj1=document.getElementById("div_wz_"+arr_this_wzh[i]);
|
|
if(arr_this_wzh[i]==wzh)
|
|
obj1.className="zycl_wzh_selected";
|
|
else
|
|
obj1.className="zycl_wzh_normal";
|
|
}
|
|
}
|
|
//穿上
|
|
function dress_up(l,pic,pic_prop,ks,js,pic_gan_w,exist_pic){
|
|
add_yc_str(l,pic,pic_prop,ks,js,pic_gan_w,exist_pic);
|
|
re_dress(selected_wzh);
|
|
}
|
|
//脱掉
|
|
function dress_down(wzh,ord){
|
|
del_yc_str(wzh,ord);
|
|
re_dress(wzh);
|
|
}
|
|
//向里面移动一层
|
|
function dress_left(wzh,ord){
|
|
yd_yc_str(wzh,ord,"left");
|
|
re_dress(wzh);
|
|
}
|
|
//向外面移动一层
|
|
function dress_right(wzh,ord){
|
|
yd_yc_str(wzh,ord,"right");
|
|
re_dress(wzh);
|
|
}
|
|
//陈列件数变更
|
|
function deel_js(wzh,ord,num){
|
|
deel_js_yc_str(wzh,ord,num);
|
|
re_dress(wzh);
|
|
}
|
|
//
|
|
//处理穿着变量,穿上
|
|
function add_yc_str(l,pic,pic_prop,ks,js,pic_gan_w,exist_pic){
|
|
//检查是否允许陈列
|
|
var arr_sys_zycl_dress_level=sys_zycl_dress_level.split(",");
|
|
if(in_array(arr_sys_zycl_dress_level,l)==-1){
|
|
alert("该款不允许陈列,仅可以作为备选!");
|
|
return "";
|
|
}
|
|
if(str_yc!=""){
|
|
var arr_yc=str_yc.split(",");
|
|
//
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==selected_wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
if(get_pic_path(selected_wzh)=="gan"){
|
|
//------------------陈列杆的新增
|
|
//判断是否已经陈列了
|
|
var is_cl="n";
|
|
var arr_tmp=[];
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(arr_tmp[5]==ks){
|
|
is_cl="y";
|
|
alert("该款已陈列!");
|
|
break;
|
|
}
|
|
}
|
|
if(is_cl=="n"){
|
|
if(check_limit_js(arr_this_wz_yc,ind_wzh)=="y")
|
|
return;
|
|
var new_ord=0;
|
|
if(arr_yc2[ind_wzh]!=""){
|
|
arr_tmp=arr_yc2[ind_wzh].split(",");
|
|
new_ord=arr_tmp.length;
|
|
}else{
|
|
new_ord=1;
|
|
}
|
|
arr_yc2[ind_wzh]+=selected_wzh+"|"+new_ord+"|"+l+"|"+pic+"|"+pic_prop+"|"+ks+"|"+js+"|"+pic_gan_w+"|"+exist_pic+",";
|
|
}
|
|
}else{
|
|
//------------------挂装的新增
|
|
var arr_tmp=[];
|
|
var arr_level=[];
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
if(arr_this_wz_yc[i]!=""){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
arr_level[i]=arr_tmp[2];
|
|
}
|
|
}
|
|
var str_yc2="";
|
|
var is_th="n";
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
if(arr_this_wz_yc[i]!=""){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(arr_tmp[2]==l){
|
|
str_yc2+=arr_tmp[0]+"|"+arr_tmp[1]+"|"+arr_tmp[2]+"|"+pic+"|"+pic_prop+"|"+ks+"|"+js+"|"+pic_gan_w+"|"+exist_pic+",";
|
|
is_th="y";
|
|
}else{
|
|
str_yc2+=arr_tmp[0]+"|"+arr_tmp[1]+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+"|"+arr_tmp[6]+"|"+arr_tmp[7]+"|"+arr_tmp[8]+",";
|
|
}
|
|
}
|
|
}
|
|
//替换
|
|
if(is_th=="n"){
|
|
//新增
|
|
arr_level.push(l);
|
|
arr_level.sort(function(a,b){return a>b?1:-1});
|
|
var add_index=0;
|
|
for(var i=0;i<arr_level.length;i++){
|
|
if(arr_level[i]==l)
|
|
add_index=i;
|
|
}
|
|
var is_added="n";
|
|
var new_i=1;
|
|
var str_yc2="";
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
if(arr_this_wz_yc[i]!=""){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(i==add_index){
|
|
str_yc2+=selected_wzh+"|"+new_i+"|"+l+"|"+pic+"|"+pic_prop+"|"+ks+"|"+js+"|"+pic_gan_w+"|"+exist_pic+",";
|
|
is_added="y";
|
|
new_i++;
|
|
}
|
|
str_yc2+=arr_tmp[0]+"|"+new_i+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+"|"+arr_tmp[6]+"|"+arr_tmp[7]+"|"+arr_tmp[8]+",";
|
|
new_i++;
|
|
}
|
|
}
|
|
if(is_added=="n"){
|
|
str_yc2+=selected_wzh+"|"+new_i+"|"+l+"|"+pic+"|"+pic_prop+"|"+ks+"|"+js+"|"+pic_gan_w+"|"+exist_pic+",";
|
|
}
|
|
}
|
|
arr_yc2[ind_wzh]=str_yc2;
|
|
}
|
|
str_yc="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_yc2[i])
|
|
str_yc+=arr_yc2[i];
|
|
}
|
|
//去掉尾部逗号
|
|
str_yc=str_yc.substring(0,str_yc.length-1);
|
|
}else{
|
|
str_yc=selected_wzh+"|1|"+l+"|"+pic+"|"+pic_prop+"|"+ks+"|"+js+"|"+pic_gan_w+"|"+exist_pic;
|
|
}
|
|
//alert(str_yc);
|
|
}
|
|
//对正挂陈列的服装根据dress_level重新排序
|
|
function re_order_str_yc(){
|
|
var arr_yc=str_yc.split(",");
|
|
var arr_yc_wz=[];
|
|
var arr_yc_wz_dress_level=[];
|
|
var arr_tmp=[];
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc_wz[i]="";
|
|
arr_yc_wz_dress_level[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc_wz[i]+=arr_yc[j]+",";
|
|
arr_yc_wz_dress_level[i]+=arr_tmp[2]+",";
|
|
}
|
|
}
|
|
}
|
|
var str_yc2="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(get_pic_path(arr_this_wzh[i])=="gan"){
|
|
//侧挂,不处理
|
|
str_yc2+=arr_yc_wz[i]+",";
|
|
}else{
|
|
//正挂,重新排序
|
|
var arr_tmp_level=arr_yc_wz_dress_level[i].split(",");
|
|
var arr_tmp_yc=arr_yc_wz[i].split(",");
|
|
arr_tmp_level.sort(function(a,b){return a>b?1:-1});
|
|
for(var i1=0;i1<arr_tmp_level.length;i1++){
|
|
//
|
|
for(var j1=0;j1<arr_tmp_yc.length;j1++){
|
|
arr_tmp=arr_tmp_yc[j1].split("|");
|
|
if(arr_tmp[2]==arr_tmp_level[i1])
|
|
str_yc2+=arr_tmp_yc[j1]+",";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
str_yc=str_yc2;
|
|
//去掉尾部逗号
|
|
if(str_yc)
|
|
str_yc=str_yc.substring(0,str_yc.length-1);
|
|
//alert(str_yc);
|
|
}
|
|
//检查件数限制
|
|
function check_limit_js(arr_this_wz_yc,ind_wzh){
|
|
var arr_js_limit=arr_this_mb[4].split(",");
|
|
var yc_js=0;
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(parseInt(arr_tmp[6])>0)
|
|
yc_js+=parseInt(arr_tmp[6]);
|
|
}
|
|
if(arr_js_limit[ind_wzh]>0 && yc_js==arr_js_limit[ind_wzh]){
|
|
alert("对不起,超过了最高件数限制("+arr_js_limit[ind_wzh]+"件)");
|
|
return "y";
|
|
}
|
|
return "n";
|
|
}
|
|
//检查右边是否有衣服
|
|
function check_right(wzh,ord){
|
|
var arr_yc=str_yc.split(",");
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
var r="n";
|
|
var arr_ind=[];
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
arr_ind[i]=arr_tmp[1];
|
|
}
|
|
if(parseInt(arr_ind[arr_ind.length-2])>parseInt(ord))
|
|
r="y";
|
|
return r;
|
|
}
|
|
//检查里面是否有衣服
|
|
function check_left(wzh,ord){
|
|
var arr_yc=str_yc.split(",");
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
var r="n";
|
|
var arr_tmp=arr_this_wz_yc[0].split("|");
|
|
if(parseInt(ord)>parseInt(arr_tmp[1]))
|
|
r="y";
|
|
return r;
|
|
}
|
|
//处理穿着变量,去除
|
|
function del_yc_str(wzh,ord){
|
|
var arr_yc=str_yc.split(",");
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
var new_i=1;
|
|
var str_yc2="";
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
if(arr_this_wz_yc[i]!=""){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(arr_tmp[1]!=ord){
|
|
str_yc2+=arr_tmp[0]+"|"+new_i+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+"|"+arr_tmp[6]+"|"+arr_tmp[7]+"|"+arr_tmp[8]+",";
|
|
new_i++;
|
|
}
|
|
}
|
|
}
|
|
arr_yc2[ind_wzh]=str_yc2;
|
|
str_yc="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_yc2[i])
|
|
str_yc+=arr_yc2[i];
|
|
}
|
|
//去掉尾部逗号
|
|
if(str_yc)
|
|
str_yc=str_yc.substring(0,str_yc.length-1);
|
|
}
|
|
//改变陈列件数
|
|
function deel_js_yc_str(wzh,ord,num){
|
|
var arr_yc=str_yc.split(",");
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
if(num>1 && check_limit_js(arr_this_wz_yc,ind_wzh)=="y")
|
|
return;
|
|
var str_yc2="";
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
if(arr_this_wz_yc[i]!=""){
|
|
arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(arr_tmp[1]==ord){
|
|
str_yc2+=arr_tmp[0]+"|"+arr_tmp[1]+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+"|"+num+"|"+arr_tmp[7]+"|"+arr_tmp[8]+",";
|
|
}else{
|
|
str_yc2+=arr_tmp[0]+"|"+arr_tmp[1]+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+"|"+arr_tmp[6]+"|"+arr_tmp[7]+"|"+arr_tmp[8]+",";
|
|
}
|
|
}
|
|
}
|
|
arr_yc2[ind_wzh]=str_yc2;
|
|
str_yc="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_yc2[i])
|
|
str_yc+=arr_yc2[i];
|
|
}
|
|
//去掉尾部逗号
|
|
if(str_yc)
|
|
str_yc=str_yc.substring(0,str_yc.length-1);
|
|
}
|
|
//处理穿着变量,向里面或者外面移动一层
|
|
function yd_yc_str(wzh,ord,di){
|
|
var arr_yc=str_yc.split(",");
|
|
var arr_yc2=[];
|
|
var arr_tmp=[];
|
|
var ind_wzh=0;
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
arr_yc2[i]="";
|
|
}
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_this_wzh[i]==wzh)
|
|
ind_wzh=i;
|
|
for(var j=0;j<arr_yc.length;j++){
|
|
arr_tmp=arr_yc[j].split("|");
|
|
if(arr_tmp[0]==arr_this_wzh[i]){
|
|
arr_yc2[i]+=arr_yc[j]+",";
|
|
}
|
|
}
|
|
}
|
|
var arr_this_wz_yc=arr_yc2[ind_wzh].split(",");
|
|
var this_index=0;
|
|
var arr_level=[],arr_pic=[],arr_pic_prop=[],arr_ks=[],arr_js=[],arr_pic_gan_w=[],arr_exist_pic=[];
|
|
for(var i=0;i<arr_this_wz_yc.length;i++){
|
|
var arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(arr_tmp[1]==ord)
|
|
this_index=i;
|
|
arr_level[i]=arr_tmp[2];
|
|
arr_pic[i]=arr_tmp[3];
|
|
arr_pic_prop[i]=arr_tmp[4];
|
|
arr_ks[i]=arr_tmp[5];
|
|
arr_js[i]=arr_tmp[6];
|
|
arr_pic_gan_w[i]=arr_tmp[7];
|
|
arr_exist_pic[i]=arr_tmp[8];
|
|
}
|
|
if(di=="left")
|
|
var o_index=this_index-1;
|
|
else
|
|
var o_index=this_index+1;
|
|
str_yc2="";
|
|
for(var i=0,ord1=1;i<arr_this_wz_yc.length;i++,ord1++){
|
|
if(arr_this_wz_yc[i]){
|
|
var arr_tmp=arr_this_wz_yc[i].split("|");
|
|
if(i==this_index){
|
|
str_yc2+=arr_tmp[0]+"|"+ord1+"|"+arr_level[o_index]+"|"+arr_pic[o_index]+"|"+arr_pic_prop[o_index]+"|"+arr_ks[o_index]+"|"+arr_js[o_index]+"|"+arr_pic_gan_w[o_index]+"|"+arr_exist_pic[o_index]+",";
|
|
}else if(i==o_index){
|
|
str_yc2+=arr_tmp[0]+"|"+ord1+"|"+arr_level[this_index]+"|"+arr_pic[this_index]+"|"+arr_pic_prop[this_index]+"|"+arr_ks[this_index]+"|"+arr_js[this_index]+"|"+arr_pic_gan_w[this_index]+"|"+arr_exist_pic[this_index]+",";
|
|
}else{
|
|
str_yc2+=arr_tmp[0]+"|"+ord1+"|"+arr_tmp[2]+"|"+arr_tmp[3]+"|"+arr_tmp[4]+"|"+arr_tmp[5]+"|"+arr_tmp[6]+"|"+arr_tmp[7]+"|"+arr_tmp[8]+",";
|
|
}
|
|
}
|
|
}
|
|
arr_yc2[ind_wzh]=str_yc2;
|
|
str_yc="";
|
|
for(var i=0;i<arr_this_wzh.length;i++){
|
|
if(arr_yc2[i])
|
|
str_yc+=arr_yc2[i];
|
|
}
|
|
//去掉尾部逗号
|
|
if(str_yc)
|
|
str_yc=str_yc.substring(0,str_yc.length-1);
|
|
}
|
|
//
|
|
function get_pic_path(wzh){
|
|
var arr_tmp_pic_path=arr_this_mb[2].split(",");
|
|
var arr_tmp_wzh=arr_this_mb[1].split(",");
|
|
var r="";
|
|
for(var i=0;i<arr_tmp_wzh.length;i++){
|
|
if(arr_tmp_wzh[i]==wzh){
|
|
r=arr_tmp_pic_path[i];
|
|
break;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
//
|
|
function in_array(arr,v){
|
|
var r=-1;
|
|
for(var i=0;i<arr.length;i++){
|
|
if(arr[i]==v){
|
|
r=i;
|
|
break;
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
//计算侧挂的偏移量
|
|
function count_gan_pic_die_num(gan_width1,gan_pic_width1,sj_pic_width1,pic_width1){
|
|
var width_over=gan_pic_width1-gan_width1;
|
|
var r=0;
|
|
if(width_over>0){
|
|
r=Math.round(width_over*pic_width1/sj_pic_width1);
|
|
}
|
|
return r;
|
|
}
|
|
</script>
|
|
</html> |