index.php 11.5 KB
<?php $this->_extends('layout/admin_layout');?>
<?php $this->_block('main');?>
<ul class="nav nav-tabs" type="<?php echo $this->view->type;?>">
  <li <?php echo $this->view->type == 0 ? 'class="active"' :''; ?> >
  		<a href="/admin/onlinereg/index">参展商登记</a>
  </li>
  <li <?php echo $this->view->type == 1 ? 'class="active"' :''; ?>>
  		<a href="/admin/onlinereg/index/type/1">赞助商登记</a>
  </li>
    <li <?php echo $this->view->type == 2 ? 'class="active"' :''; ?>>
  		<a href="/admin/onlinereg/index/type/2">媒体登记</a>
  </li>
</ul>
<?php if($this->view->type == 0)://参展商登记?>

<table class="table">
<caption style="text-align:left; padding-bottom:5px;">
    <button class="btn" style="float:left;" onclick="location.href='/admin/onlinereg/download/type/0';">查看参展商手册</button>
    <button class="btn batch_export" style="margin-left:100px">批量导出</button>
</caption>
   <thead>
      <td width="5%">选择</td>
      <td width="5%">ID</td>
      <td width="5%">品牌名称</td>
      <td width="5%">类型</td>
      <td width="5%">联系人</td>
      <td width="5%">电话</td>
      <td width="5%">创建时间</td>
      <td width="10%">操作</td>
   </thead>
   <?php foreach($this->view->list as $seller):?>
   <tr>
   		<td><input type="checkbox" seller_id="<?php echo $seller['id']?>"></td>
   		<td><?php echo $seller['id']?></td>
   		<td><?php echo $seller['name']?></td>
   		<td><?php echo $this->view->sellerTypes[$this->view->type];?></td>
   		<td><?php echo $seller['contact']?></td>
   		<td><?php echo $seller['telphone']?></td>
   		<td><?php echo date('Y-m-d H:i:s', $seller['create_time']);?></td>
   		<td>
			<button  class="btn look" seller_id="<?php echo $seller['id']?>">查看</button>
			<button  class="btn btn-danger export" onclick="location.href='/admin/onlinereg/export?id=<?php echo $seller['id']?>';">导出</button>
   		</td>
   </tr>
   <?php endforeach;?>
</table>

 <div id="form_pan" admin="" style="display:none;">
       <table class="table table-bordered">
          <tbody>
            <tr>
	             <td>品牌名称<span class="text-error"> * </span></td>
	              <td><input type="text" name="name"/></td>
            </tr>
            <tr>
              <td>是否品牌入驻有货<span class="text-error"> * </span></td>
              <td>
              	 <select id="is_enter_yohobuy" name="is_enter_yohobuy">
              	 	<option value="0"></option>
              		<option value="1"></option>
              	</select>
              </td>
            </tr>
            <tr>
               <td>品牌注册<span class="text-error"> * </span></td>
               <td>
                  <select id="brand_reg_type" name="brand_reg_type">
                    <option value="0">未注册</option>
                    <option value="1">已注册</option>
              		<option value="2">已申请</option>
              	 </select>
               </td>
            </tr>
            <tr>
               <td>公司名称</td>
               <td><input type="text" name="company" /></td>
            </tr>
            <tr>
               <td>联系人<span class="text-error"> * </span></td>
               <td><input type="text" name="contact" /></td>
            </tr>
            <tr>
               <td>电话<span class="text-error"> * </span></td>
               <td><input type="text" name="telphone" /></td>
            </tr>
             <tr>
               <td>邮箱</td>
               <td><input type="text" name="email" /></td>
            </tr>
        	 <tr>
               <td>公司与品牌关系<span class="text-error"> * </span></td>
               <td>
                 <select id="relation" name="relation">
              	 	<option value="0">品牌商</option>
              		<option value="1">代理商</option>
              		<option value="2">经销商</option>
              		<option value="3">其他</option>
              	 </select>
               </td>
            </tr>
            <tr>
               <td>商品所在地<span class="text-error"> * </span></td>
               <td><input type="text" name="place" /></td>
            </tr>
            <tr>
               <td>是否具有3C凭证<span class="text-error"> * </span></td>
               <td>
                 <select id="is_3c" name="is_3c">
              	 	<option value="0"></option>
              		<option value="1"></option>
              	 </select>
               </td>
            </tr>
            <tr>
               <td>品牌官网</td>
               <td><input type="text" name="website" /></td>
            </tr>
             <tr>
               <td>品牌资料</td>
               <td>
               		<div id="download_list"></div>
               </td>
            </tr>
          </tbody>
    </table>
</div>  


<?php elseif($this->view->type == 1)://赞助商登记?>

<table class="table">
	<caption style="text-align:left; padding-bottom:5px;">
		<button class="btn batch_export" style="float:left;">批量导出</button>
	</caption>
   <thead>
      <td width="5%">选择</td>
      <td width="5%">ID</td>
      <td width="5%">品牌名称</td>
      <td width="5%">产品类型</td>
      <td width="5%">类型</td>
      <td width="5%">联系人</td>
      <td width="5%">电话</td>
      <td width="5%">时间</td>
      <td width="10%">操作</td>
   </thead>
   <?php foreach($this->view->list as $seller):?>
   <tr>
   		<td><input type="checkbox" seller_id="<?php echo $seller['id']?>"></td>
   		<td><?php echo $seller['id']?></td>
   		<td><?php echo $seller['name']?></td>
   		<td width="15%"><?php echo $seller['product_type']?></td>
   		<td><?php echo $this->view->sellerTypes[$this->view->type];?></td>
   		<td><?php echo $seller['contact']?></td>
   		<td><?php echo $seller['telphone']?></td>
   		<td><?php echo date('Y-m-d H:i:s', $seller['create_time']);?></td>
   		<td>
			<button  class="btn look" seller_id="<?php echo $seller['id']?>">查看</button>
			<button  class="btn btn-danger export" onclick="location.href='/admin/onlinereg/export?id=<?php echo $seller['id']?>';">导出</button>
   		</td>
   </tr>
   <?php endforeach;?>
</table>

 <div id="form_pan" admin="" style="display:none;">
       <table class="table table-bordered">
          <tbody>
            <tr>
	             <td>品牌名称<span class="text-error"> * </span></td>
	              <td><input type="text" name="name"/></td>
            </tr>
            <tr>
              <td>是否品牌入驻有货<span class="text-error"> * </span></td>
              <td>
              	<select id="is_enter_yohobuy" name="is_enter_yohobuy">
              	 	<option value="0"></option>
              		<option value="1"></option>
              	</select>
              </td>
            </tr>
            <tr>
               <td>产品类型<span class="text-error"> * </span></td>
               <td><input type="text" name="product_type" /></td>
            </tr>
            <tr>
               <td>所属国家</td>
               <td><input type="text" name="country" /></td>
            </tr>
            <tr>
               <td>公司名称</td>
               <td><input type="text" name="company" /></td>
            </tr>
            <tr>
               <td>公司地址</td>
               <td><input type="text" name="place" /></td>
            </tr>
            <tr>
               <td>联系人<span class="text-error"> * </span></td>
               <td><input type="text" name="contact" /></td>
            </tr>
            <tr>
               <td>电话<span class="text-error"> * </span></td>
               <td><input type="text" name="telphone" /></td>
            </tr>
            <tr>
               <td>邮箱</td>
               <td><input type="text" name="email" /></td>
            </tr>
            <tr>
               <td>品牌官网</td>
               <td><input type="text" name="website" /></td>
            </tr>
            <tr>
               <td>品牌资料</td>
               <td>
               		<div id="download_list"></div>
               </td>
            </tr>
          </tbody>
    </table>
</div>  



<?php elseif($this->view->type == 2)://媒体登记?>

<table class="table">
<caption style="text-align:left; padding-bottom:5px;">
    <button class="btn" style="float:left;" onclick="location.href='/admin/onlinereg/download/type/1';">查看新闻稿</button>
    <button class="btn batch_export" style="margin-left:100px">批量导出</button>
</caption>
   <thead>
      <td width="5%">选择</td>
      <td width="5%">ID</td>
      <td width="5%">姓名</td>
      <td width="5%">类型</td>
      <td width="6%">手机号</td>
      <td width="6%">媒体名</td>
      <td width="7%">创建时间</td>
      <td width="12%">操作</td>
   </thead>
   <?php foreach($this->view->list as $seller):?>
   <tr>
   		<td><input type="checkbox" seller_id="<?php echo $seller['id']?>"></td>
   		<td><?php echo $seller['id']?></td>
   		<td><?php echo $seller['name']?></td>
   		<td><?php echo $this->view->sellerTypes[$this->view->type];?></td>
   		<td><?php echo $seller['mobile']?></td>
   		<td><?php echo $seller['company']?></td>
   		<td><?php echo date('Y-m-d H:i:s', $seller['create_time']);?></td>
   		<td>
			<button  class="btn look" seller_id="<?php echo $seller['id']?>">查看</button>
			<button  class="btn btn-danger export" onclick="location.href='/admin/onlinereg/export?id=<?php echo $seller['id']?>';">导出</button>
   		</td>
   </tr>
   <?php endforeach;?>
</table>

 <div id="form_pan" admin="" style="display:none;">
       <table class="table table-bordered">
          <tbody>
            <tr>
	             <td>姓名<span class="text-error"> * </span></td>
	              <td><input type="text" name="name"/></td>
            </tr>
            <tr>
              <td>职位</td>
              <td><input type="text" name="profession" /></td>
            </tr>
            <tr>
               <td>性别</td>
               <td><input type="text" name="sex" /></td>
            </tr>
            <tr>
               <td>媒体名/公司名</td>
               <td><input type="text" name="company" /></td>
            </tr>
            <tr>
               <td>介绍</td>
               <td><input type="text" name="introduction" /></td>
            </tr>
            <tr>
               <td>官网地址</td>
               <td><input type="text" name="website" /></td>
            </tr>
            <tr>
               <td>所在城市</td>
               <td><input type="text" name="city" /></td>
            </tr>
            <tr>
               <td>邮箱</td>
               <td><input type="text" name="email" /></td>
            </tr>
            <tr>
               <td>手机<span class="text-error"> * </span></td>
               <td><input type="text" name="mobile" /></td>
            </tr>
            <tr>
               <td>座机</td>
               <td><input type="text" name="telphone" /></td>
            </tr>
            <tr>
               <td>固定地址</td>
               <td><input type="text" name="place" /></td>
            </tr>
            <tr>
               <td>邮编</td>
               <td><input type="text" name="zipcode" /></td>
            </tr>
          </tbody>
    </table>
</div>  

<?php endif;?>
<?php $this->_component('Common_Pagination',array(
    'pagination' => $this->view->pagination,'show_count' =>true,
 ));?>
 
<?php $this->_endblock();?> 
<?php $this->_block('js');?>

<?php $this->_js('feedback.js', array(
    SITE_JS . '/lib/seajs.js',
));?>

<script type="text/javascript">
seajs.use('admin/onlinereg',function(onlinereg){
	onlinereg.index();
});
</script>
<?php $this->_endblock();?>