<?php /*a:4:{s:83:"F:\wpf\WpfApp1\WpfApp1\bin\x64\Debug\web\im\application\seller\view\goods\edit.html";i:1583743582;s:86:"F:\wpf\WpfApp1\WpfApp1\bin\x64\Debug\web\im\application\seller\view\public\header.html";i:1594566513;s:86:"F:\wpf\WpfApp1\WpfApp1\bin\x64\Debug\web\im\application\seller\view\public\dialog.html";i:1594453374;s:86:"F:\wpf\WpfApp1\WpfApp1\bin\x64\Debug\web\im\application\seller\view\public\footer.html";i:1581749670;}*/ ?>
 <!-- 头部 -->
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<title><?php echo htmlentities((isset($meta_title) && ($meta_title !== '')?$meta_title:"")); ?>|商家后台管理</title>
    	<link rel="stylesheet" href="/im/public/common/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="/im/public/common/font.css">
		<link rel="stylesheet" href="/im/public/seller/css/style.css" />

	<script type="text/javascript" src="/im/public/common/jquery.min.js" ></script>
   <script type="text/javascript" src="/im/public/common/layer/layer.js"></script>

	<!-- 自定义弹窗-->
    <script>
	var dialog_style ="<?php echo api('DIALOG_STYLE'); ?>";
	var index_url="<?php echo url('index/index'); ?>";
	$(".logo").click(function(){
	   location.href=index_url;
	});
</script>
  <!--引入改进型easydialog弹窗 -->	
<?php if(api('DIALOG_STYLE') == '1'): ?>	
	<link rel="stylesheet" href="/im/public/seller/css/global.css">
	<link rel="stylesheet" href="/im/public/seller/css/animate.css">
	<link rel="stylesheet" href="/im/public/seller/css/dialog.css">
	<style>
		.div-testDialog{
			width: 500px;
			height: auto;
			margin: 50px auto;
		}

		.div-testDialog button{
			margin:  10px;
		}
		@media screen and ( max-width: 460px){
			.div-testDialog{
				width: 90%;
			}
		}
   </style>
<script src="/im/public/seller/js/dialog.js"></script>	
<?php endif; ?>
	

	</head>
	<body>
		<div class="top">
			<div class="logo"></div>
			<ul class="main_links">
			<li><a href="" target="_blank"><?php echo htmlentities($shop['title']); ?>的小店</a></li>
		          <li><a href="<?php echo url('index/shop/index',array('id'=>get_shop_id())); ?>" target="_blank">店铺首页</a></li>
				   <li><a href="<?php echo url('user/logout',array('id'=>get_shop_id())); ?>">退出登陆</a></li>
			</ul>	
			
			
		<script>	
		var oDiv3 = document.getElementById('user_icon');
		var oDiv4 = document.getElementById('down_menu');
		var timer2 = null;
		oDiv3.onmouseover = oDiv4.onmouseover = function (){	
			oDiv4.style.display = 'block';
			clearTimeout(timer2);
		}
		oDiv3.onmouseout = oDiv4.onmouseout = function (){
			//寮€瀹氭椂鍣�
			timer2 = setTimeout(function () { 
			oDiv4.style.display = 'none'; },300);
		}
	</script>	

		</div>
	    <div class="main">
			<div class="nav_tree">
				<div class="innerUl">
<div class="innerUl"> 

<span class='tit'><a  href="javascript:vod(0);" >系统管理</a><span class="rgt icon iconfont icon-down7"></span></span>
<ul class="menuUl">

<li class="<?php if($action == 'shop/tj'): ?>active<?php endif; ?>"><a id="70" href="<?php echo url('shop/tj'); ?>">店铺统计</a></li>

<li class="<?php if($action == 'shop/systems'): ?>active<?php endif; ?>"><a id="68" href="<?php echo url('shop/systems'); ?>">店铺设置</a></li>


<li class="<?php if($action == 'category/index'): ?>active<?php endif; ?>">
<a id="147" href="<?php echo url('category/index'); ?>">分类管理</a></li>

<li class="<?php if($action == 'goods/index'): ?>active<?php endif; ?>">
<a id="147" href="<?php echo url('goods/index'); ?>">商品管理</a></li>
<li class="<?php if($action == 'coupon/index'): ?>active<?php endif; ?>">
<a id="147" href="<?php echo url('coupon/index'); ?>">优惠券管理</a></li>

</ul><span class='tit'><a  href="javascript:vod(0);" >订单管理</a><span class="rgt icon iconfont icon-down"></span></span>
<ul class="menuUl">
<li class="<?php if($action == 'order/index'): ?>active<?php endif; ?>"><a id="147" href="<?php echo url('order/index'); ?>">订单管理</a></li>

<li class="<?php if($action == 'express/index'): ?>active<?php endif; ?>"><a id="73" href="<?php echo url('express/index'); ?>">快递管理</a></li>
</ul>
<span class='tit'><a  href="javascript:vod(0);" >提现管理</a><span class="rgt icon iconfont icon-down"></span></span>
<ul class="menuUl">
<li class="<?php if($action == 'cash/index'): ?>active<?php endif; ?>"><a id="73" href="<?php echo url('cash/index'); ?>">提现管理</a></li>


<li class="<?php if($action == 'cashLog/index'): ?>active<?php endif; ?>"><a id="73" href="<?php echo url('cashLog/index'); ?>">提现记录</a></li>
<li class="<?php if($action == 'user/index'): ?>active<?php endif; ?>"><a id="147" href="<?php echo url('user/logout'); ?>">退出登录</a></li>
</ul>




 


		         </div>
		         </div>
	    </div>
		
	   <script type="text/javascript">
		    var type="<?php echo api('upload_type'); ?>";
		    if(type==1){
				  var url = "<?php echo url('Attachment/insert'); ?>";
			}else if(type==2){
				  var url = "<?php echo url('Attachment/upfile'); ?>";
			}else{    
			  var url = "<?php echo url('Attachment/update'); ?>";
			}
         $(".tit").click(function(){
                $(this).next().toggle();
				
				if($(this).find(".rgt").hasClass('icon-down')){
				console.log(1);
				   $(this).find(".rgt").attr("class","rgt icon iconfont icon-up5")
				}else{
				  $(this).find(".rgt").attr("class","rgt icon iconfont icon-down7")
				}
          });	
       </script>		 
	
	<script type="text/javascript" src="/im/public/common/upload.js"></script> 
								   <script type="text/javascript" src="/im/public/common/laydate/laydate.js"></script> 
		


<!-- 头部 --> 


			<div class="content">
			<div class="tips_msg none"><span class="tips">保存成功</span><span class="close_tips"></span></div>
					<div class="edit_title"><?php echo htmlentities((isset($meta_title) && ($meta_title !== '')?$meta_title:"")); ?></div>
				<div class="edit_box">
					
					<div class="edit_tab">
						<div class="tab_option on">基础信息</div>
						<div class="tab_option">商品分类</div>
						
						<div class="tab_option">商品相册</div>
					</div>
					<div class="edit_content">
						 <form class="group-form"  action="<?php echo url(''); ?>" method="post">
 <!-------------------------------- 基本信息 ---------------------------------------------------------------------------> 
							 <div class="edit_content_tab">
   
							 <div class="form-item">
									     <label>自定义商品分类<span>(所属自定义商品分类)</span></label>
									      <div class="form-input">
											  <select name="cate_id" >
											  <option value="0">顶级分类</option>    
											  <?php if(is_array($clist) || $clist instanceof \think\Collection || $clist instanceof \think\Paginator): $i = 0; $__LIST__ = $clist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
												<option value="<?php echo htmlentities($vo['id']); ?>"><?php echo htmlentities((isset($vo['html']) && ($vo['html'] !== '')?$vo['html']:"")); ?><?php echo htmlentities($vo['title']); ?></option>
											  <?php endforeach; endif; else: echo "" ;endif; ?>
											 </select>
										  </div> 
								     </div> 

									   <div class="form-item">
									     <label>系统商品分类<span>(所属系统商品分类)</span></label>
									      <div class="form-input">
											  <select name="category_id" >
											     <option value="0">顶级分类</option>    
											  <?php if(is_array($catelist) || $catelist instanceof \think\Collection || $catelist instanceof \think\Paginator): $i = 0; $__LIST__ = $catelist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
												<option value="<?php echo htmlentities($vo['id']); ?>"><?php echo htmlentities((isset($vo['html']) && ($vo['html'] !== '')?$vo['html']:"")); ?><?php echo htmlentities($vo['title']); ?></option>
											  <?php endforeach; endif; else: echo "" ;endif; ?>
											 </select>
										  </div> 
								     </div> 
						           <div class="form-item">
									  <label>名称<span>(标题)</span></label>
									  <div class="form-input">
									   <input type="text" name="title" value="<?php echo htmlentities((isset($info['title']) && ($info['title'] !== '')?$info['title']:"")); ?>">
									   </div>
								    </div>
                                   
								      <div class="form-item">
												<label>图片<span>(图片名称)</span></label> 
												
													<input type="hidden" name="cover_id" value="<?php echo htmlentities((isset($info['cover_id']) && ($info['cover_id'] !== '')?$info['cover_id']:'')); ?>">								
													<a id="cover_id" href="javascript:void(0);" class='btn_upload'>
													<input type="file" name="file" class='file' id="cover_id" style=""/>选择文件
													</a>
																								
											    <div class="upload_preview">
													  <?php if(!(empty($info['cover_id']) || (($info['cover_id'] instanceof \think\Collection || $info['cover_id'] instanceof \think\Paginator ) && $info['cover_id']->isEmpty()))): ?>
															  <div class="upload-pre-item"> <img src="<?php echo htmlentities(get_cover_path($info['cover_id'])); ?>"/>
															<span class='close' onclick='del(this,"cover_id");'></span> </div>
														<?php endif; ?>
												</div>
 
												<script type="text/javascript">  
													var field="cover_id";
													upload(field);
												</script>	
                                      </div>
						        	
						        	
                               
                                    <div class="form-item">
									    <label>内容<span>(详细内容)</span></label>
										<div class="form-input w100">
												<textarea class="am-validate" id="content" name="content" required><?php echo htmlentities((isset($info['content']) && ($info['content'] !== '')?$info['content']:"")); ?></textarea>	
												<link rel="stylesheet" href="/im/public/common/kindeditor/default/default.css" />
												<script charset="utf-8" src="/im/public/common/kindeditor/kindeditor-min.js"></script>
												<script charset="utf-8" src="/im/public/common/kindeditor/zh_CN.js"></script>
												<script type="text/javascript">
													var editor_content;
													KindEditor.ready(function(K) {
														editor_content = K.create('textarea[name="content"]', {
															allowFileManager : false,
															themesPath: K.basePath,
															width: '90%',
															height: '350',
															resizeType:1,
															pasteType : 2,
															urlType : 'absolute',
															fileManagerJson : '<?php echo url('fileManagerJson'); ?>',
															uploadJson : '<?php echo url("Uploads/ke_upimg"); ?>'
														});
													});

													$(function(){
														$('textarea[name="content"]').closest('form').submit(function(){
															editor_content.sync();
														});
													})
											    </script> 
										</div>
                                   </div>
                                  <div class="form-item">
									     <label>推荐位<span>(推荐位)</span></label>
									      <div class="form-input">
											  <select name="position" >
											   
											 
												<option value="1">推荐</option>
											    <option value="2">新品</option>
											 </select>
										  </div> 
								     </div> 
                                    <div class="form-item">
										 <label>价格<span>(商品价格)</span></label>
										 <div class="form-input">
										      <input type="text" name="price" value="<?php echo htmlentities((isset($info['price']) && ($info['price'] !== '')?$info['price']:'')); ?>">
										 </div>
									 </div>

						            <div class="form-item">
										<label>库存数量<span>(库存)</span></label>
										<div class="form-input">
											 <input type="text" name="num" value="<?php echo htmlentities((isset($info['num']) && ($info['num'] !== '')?$info['num']:'')); ?>">
										</div>
							        </div>
							
					
						</div>



<!-----------------------------------------------其他信息 --------------------------------------------------------------------------->

 <div class="edit_content_tab none">
                             
							 
                                
								<div class="form-item">
										 <label>运费<span>(商品运费)</span></label>
										 <div class="form-input">
										      <input type="text" name="spress" value="<?php echo htmlentities((isset($info['spress']) && ($info['spress'] !== '')?$info['spress']:'')); ?>">
										 </div>
							  </div>
	 </div>


					
 <!-----------------------------------------------相册 --------------------------------------------------------------------------->	
			     <div class="edit_content_tab none">
                              
							  <div class="form-item">
									<label>相册<span>(图片)</span></label>
									<input type="hidden" name="covers"  value="<?php echo htmlentities((isset($info['covers']) && ($info['covers'] !== '')?$info['covers']:"")); ?>"	>
									
											<a id="covers" href="javascript:void(0);" class='btn_upload'>
													<input type="file" name="file" class='file' id="covers" style=""/>选择文件
													</a>
									
									  <div class="upload_preview">
											    <?php if(!(empty($info['covers']) || (($info['covers'] instanceof \think\Collection || $info['covers'] instanceof \think\Paginator ) && $info['covers']->isEmpty()))): $list=explode(",",$info['covers']); if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): if( count($list)==0 ) : echo "" ;else: foreach($list as $key=>$vo): ?>  
												<div class="upload-pre-item"> <img src="<?php echo htmlentities(get_cover_path($vo)); ?>" data-id="<?php echo htmlentities($vo); ?>"/>
												   <span class="close"  onclick="delimage(this,'covers');"></span>
											 	</div>
												 <?php endforeach; endif; else: echo "" ;endif; ?>	
												<?php endif; ?> 
									   </div>
									 <script type="text/javascript">  
								             var field="covers";
						     	             uploads(field);
                                       </script>
							</div>

				    </div>	
						<div class="btn_group"> 
						    <input type="hidden" name="category_id" value="<?php echo htmlentities((isset($info['category_id']) && ($info['category_id'] !== '')?$info['category_id']:"")); ?>">
						    <input type="hidden" name="id" value="<?php echo htmlentities((isset($info['id']) && ($info['id'] !== '')?$info['id']:"")); ?>">
							<div class="confirm_btn">确认</div>
							<div class="cancel_btn">返回</div>
						</div>
						</form> 
					</div>
				</div>
			</div>
		</div>
	
	   <script type="text/javascript">
	     $("select[name='category_id']").val("<?php echo htmlentities((isset($info['category_id']) && ($info['category_id'] !== '')?$info['category_id']:'')); ?>");
         $("select[name='cate_id']").val("<?php echo htmlentities((isset($info['cate_id']) && ($info['cate_id'] !== '')?$info['cate_id']:'')); ?>");
		 $("select[name='brand_id']").val("<?php echo htmlentities((isset($info['brand_id']) && ($info['brand_id'] !== '')?$info['brand_id']:'')); ?>");
		 $("select[name='position']").val("<?php echo htmlentities((isset($info['position']) && ($info['position'] !== '')?$info['position']:'1')); ?>");
		 $("select[name='baoyou']").val("<?php echo htmlentities((isset($info['baoyou']) && ($info['baoyou'] !== '')?$info['baoyou']:'')); ?>");
		 $("select[name='position']").val("<?php echo htmlentities((isset($info['position']) && ($info['position'] !== '')?$info['position']:'0')); ?>");
		 var group = [<?php echo htmlentities((isset($info['attrs']) && ($info['attrs'] !== '')?$info['attrs']:'')); ?>];
			$('.attrs').each(function(){
				if( $.inArray( parseInt(this.value,10),group )>-1 ){
					$(this).prop('checked',true);
				}
		});
		 var attributes = [<?php echo htmlentities((isset($info['attributes']) && ($info['attributes'] !== '')?$info['attributes']:'')); ?>];
		$('.attributes').each(function(){
				if( $.inArray( parseInt(this.value,10),attributes )>-1 ){
					$(this).prop('checked',true);
				}
		});
		$(function(){
			var specs ="<?php echo htmlentities((isset($info['specs']) && ($info['specs'] !== '')?$info['specs']:'')); ?>";
			$('.specs').each(function(){
				if( specs.indexOf(this.value)>=0){
				   $(this).prop('checked',true);
				}
			});
			if(specs){
			 $(".div_contentlist label").change();
		   }
		});
		$(".tab_option").click(function(){
					if(!$(this).hasClass("on")){
						var index = $(".tab_option").index($(this));
						$($(".edit_content_tab").get(index)).removeClass("none").siblings(".edit_content_tab").addClass("none");
						$(this).addClass("on").siblings().removeClass("on");
					}
					
		});
				
	</script>	
 <!-- 头部 -->
	
<script src="/im/public/seller/js/common.js"></script>
<script>
var html='<footer style=""><p> Powered by <a href="http://www.yershop.com/" target="_blank">yershop V3.0</a> </p></footer>';

$(".content").append(html);

</script>
</body>
</html>
<!-- 头部 --> 
