{include file="public/joinin_header" /}
<div class="breadcrumb"><span class="icon-home"></span><span><a href="">首页</a></span> <span class="arrow">></span> <span>商家入驻申请</span> </div>
<div class="main">
    <div class="sidebar">
        <div class="title">
            <h3>商家入驻申请</h3>
        </div>
        <div class="content">
            <?php if(!empty($list) && is_array($list)){ ?>
            <?php foreach($list as $key => $val){ ?>
            <dl show_id="<?php echo $val['type_id'];?>">
                <dt onclick="show_list('<?php echo $val['type_id'];?>');" style="cursor: pointer;"> <i class="hide"></i><?php echo $val['type_name'];?></dt>
                <dd style="display:none;">
                    <ul>
                        <?php if(!empty($val['help_list']) && is_array($val['help_list'])){ ?>
                        <?php foreach($val['help_list'] as $k => $v){ ?>
                        <li> <i></i>
                            <?php if(empty($v['help_url'])){ ?>
                            <a href="{:url('/Home/Showhelp/index',['t_id'=>$v.type_id,'help_id'=>$v.help_id])}" target="_blank"><?php echo $v['help_title'];?></a>
                            <?php }else { ?>
                            <a href="<?php echo $v['help_url'];?>" target="_blank"><?php echo $v['help_title'];?></a>
                            <?php } ?>
                        </li>
                        <?php } ?>
                        <?php } ?>
                    </ul>
                </dd>
            </dl>
            <?php } ?>
            <?php } ?>
            <dl>
                <dt class="<?php echo $sub_step == 'step0' ? 'current' : '';?>"> <i class="hide"></i>签订入驻协议</dt>
            </dl>
            <dl show_id="0">
                <dt onclick="show_list('0');" style="cursor: pointer;"> <i class="show"></i>提交申请</dt>
                <dd>
                    <ul>
                        <li class="<?php echo $step == '1' ? 'current' : '';?>"><i></i>公司资质信息</li>
                        <li class="<?php echo $step == '2' ? 'current' : '';?>"><i></i>财务资质信息</li>
                        <li class="<?php echo $step == '3' ? 'current' : '';?>"><i></i>店铺经营信息</li>
                    </ul>
                </dd>
            </dl>
            <dl>
                <dt class="<?php echo $step == '4' ? 'current' : '';?>"> <i class="hide"></i>合同签订及缴费</dt>
            </dl>
            <dl>
                <dt> <i class="hide"></i>店铺开通</dt>
            </dl>
        </div>
        <div class="title">
            <h3>平台联系方式</h3>
        </div>
        <div class="content">
            <ul>
                <?php
                if(is_array($phone_array) && !empty($phone_array)) {
                foreach($phone_array as $key => $val) {
                ?>
                <li><?php echo '电话'.($key+1).':';?><?php echo $val;?></li>
                <?php
                }
                }
                ?>
                <li><?php echo '邮箱:';?><?php echo config('site_email');?></li>
            </ul>
        </div>
    </div>
    <div class="right-layout">
        <div class="joinin-step">
            <ul>
                <li class="step1 <?php echo $step >= 0 ? 'current' : '';?>"><span>签订入驻协议</span></li>
                <li class="<?php echo $step >= 1 ? 'current' : '';?>"><span>公司资质信息</span></li>
                <li class="<?php echo $step >= 2 ? 'current' : '';?>"><span>财务资质信息</span></li>
                <li class="<?php echo $step >= 3 ? 'current' : '';?>"><span>店铺经营信息</span></li>
                <li class="<?php echo $step >= 4 ? 'current' : '';?>"><span>合同签订及缴费</span></li>
                <li class="step6"><span>店铺开通</span></li>
            </ul>
        </div>
        <div class="joinin-concrete">
            <!--区别部分 BEGIN-->


            
            

<!-- 公司资质  -->

<div id="apply_credentials_info" class="apply-credentials-info">
  <div class="alert">
    <h4>注意事项：</h4>
    以下所需要上传的电子版资质文件仅支持JPG\GIF\PNG格式图片，大小请控制在1M之内。</div>
  <form id="form_credentials_info" action="{:url('/Home/Sellerjoinin/step3')}" method="post" enctype="multipart/form-data" >
    <table border="0" cellpadding="0" cellspacing="0" class="all">
      <thead>
        <tr>
          <th colspan="20">开户银行信息</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th class="w150"><i>*</i>银行开户名：</th>
          <td><input name="bank_account_name" type="text" class="w200" />
            <span></span></td>
        </tr>
        <tr>
          <th><i>*</i>公司银行账号：</th>
          <td><input name="bank_account_number" type="text" class="w200" />
            <span></span></td>
        </tr>
        <tr>
          <th><i>*</i>开户银行支行名称：</th>
          <td><input name="bank_name" type="text" class="w200" />
            <span></span></td>
        </tr>
        <!-- 简化 tr>
          <th><i>*</i>支行联行号：</th>
          <td><input name="bank_code" type="text" class="w200" />
            <span></span></td>
        </tr-->
        <tr>
          <th><i>*</i>开户银行所在地：</th>
          <td><input id="bank_address" name="bank_address" type="hidden" />
            <span></span></td>
        </tr>

        <!--<tr>
          <th><i>*</i>开户银行许可证电子版：</th>
          <td><input name="bank_licence_electronic" type="file" />
            <span class="block">请确保图片清晰，文字可辨并有清晰的红色公章。</span></td>
        </tr> end-->
        <tr>
          <th></th>
          <td><input id="is_settlement_account" name="is_settlement_account" type="checkbox" />
            <label for="is_settlement_account">此账号为结算账号</label></td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="20">&nbsp;</td>
        </tr>
      </tfoot>
    </table>
    <div id="div_settlement">
      <table border="0" cellpadding="0" cellspacing="0" class="all">
        <thead>
          <tr>
            <th colspan="20">结算账号信息</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="w150"><i>*</i>银行开户名：</th>
            <td><input id="settlement_bank_account_name" name="settlement_bank_account_name" type="text" class="w200"/>
              <span></span></td>
          </tr>
          <tr>
            <th><i>*</i>公司银行账号：</th>
            <td><input id="settlement_bank_account_number" name="settlement_bank_account_number" type="text" class="w200"/>
              <span></span></td>
          </tr>
          <tr>
            <th><i>*</i>开户银行支行名称：</th>
            <td><input id="settlement_bank_name" name="settlement_bank_name" type="text" class="w200"/>
              <span></span></td>
          </tr>

          <!--tr>
            <th><i>*</i>支行联行号：</th>
            <td><input id="settlement_bank_code" name="settlement_bank_code" type="text" class="w200"/>
              <span></span></td>
          </tr-->
          <tr>
            <th><i>*</i>开户银行所在地：</th>
            <td><input id="settlement_bank_address" name="settlement_bank_address" type="hidden" />
              <span></span></td>
          </tr>
        </tbody>
        <tfoot>
          <tr>
            <td colspan="20">&nbsp;</td>
          </tr>
        </tfoot>
      </table>
    </div>
    <table border="0" cellpadding="0" cellspacing="0" class="all">
      <thead>
        <tr>
          <th colspan="20">税务登记证</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <th class="w150"><i>*</i>税务登记证号：</th>
          <td><input name="tax_registration_certificate" type="text" class="w200"/>
            <span></span></td>
        </tr>

        <!--tr>
          <th><i>*</i>纳税人识别号：</th>
          <td><input name="taxpayer_id" type="text" class="w200"/>
            <span></span></td>
        </tr-->
        <tr>
          <th><i>*</i>税务登记证号电子版：</th>
          <td><input name="tax_registration_certificate_electronic" type="file" />
            <span class="block">请确保图片清晰，文字可辨并有清晰的红色公章。</span></td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="20">&nbsp;</td>
        </tr>
      </tfoot>
    </table>
  </form>
  <div class="bottom"><a id="btn_apply_credentials_next" href="javascript:;" class="btn">下一步，提交店铺经营信息</a></div>
</div>
            <script src="{$Think.config.url_domain_root}static/home/js/common.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    var use_settlement_account = true;
    $("#bank_address").nc_region();
    $("#settlement_bank_address").nc_region();

    $("#is_settlement_account").on("click", function() {
        if($(this).prop("checked")) {
            use_settlement_account = false;  
            $("#div_settlement").hide();
            $("#settlement_bank_account_name").val("");
            $("#settlement_bank_account_number").val("");
            $("#settlement_bank_name").val("");

            //$("#settlement_bank_code").val("");
            $("#settlement_bank_address").val("");
        } else {
            use_settlement_account = true;  
            $("#div_settlement").show();
        }
    });

    $('#form_credentials_info').validate({
        errorPlacement: function(error, element){
            element.nextAll('span').first().after(error);
        },
        rules : {
            bank_account_name: {
                required: true,
                maxlength: 50 
            },
            bank_account_number: {
                required: true,
                maxlength: 22 
            },
            bank_name: {
                required: true,
                maxlength: 50 
            },

           /*  bank_code: {
                required: true,
                maxlength: 20 
            }, */
            bank_address: {
                required: true
            },

           /*  bank_licence_electronic: {
                required: true
            }, */
            settlement_bank_account_name: {
                required: function() { return use_settlement_account; },    
                maxlength: 50 
            },
            settlement_bank_account_number: {
                required: function() { return use_settlement_account; },
                maxlength: 20 
            },
            settlement_bank_name: {
                required: function() { return use_settlement_account; },
                maxlength: 50 
            },

          /*   settlement_bank_code: {
                required: function() { return use_settlement_account; },
                maxlength: 20 
            }, */
            settlement_bank_address: {
                required: function() { return use_settlement_account; }
            },
            tax_registration_certificate: {
                required: true,
                maxlength: 20
            }

        },
        messages : {
            bank_account_name: {
                required: '请填写银行开户名',
                maxlength: jQuery.validator.format("最多{0}个字")
            },
            bank_account_number: {
                required: '请填写公司银行账号',
                maxlength: jQuery.validator.format("最多{0}个字")
            },
            bank_name: {
                required: '请填写开户银行支行名称',
                maxlength: jQuery.validator.format("最多{0}个字")
            },

           /*  bank_code: {
                required: '请填写支行联行号',
                maxlength: jQuery.validator.format("最多{0}个字")
            }, */
            bank_address: {
                required: '请选择开户银行所在地'
            },

         /*   ank_licence_electronic: {
                required: '请选择上传开户银行许可证电子版文件'
            }, */
            settlement_bank_account_name: {
                required: '请填写银行开户名',
                maxlength: jQuery.validator.format("最多{0}个字")
            },
            settlement_bank_account_number: {
                required: '请填写公司银行账号',
                maxlength: jQuery.validator.format("最多{0}个字")
            },
            settlement_bank_name: {
                required: '请填写开户银行支行名称',
                maxlength: jQuery.validator.format("最多{0}个字")
            },

        /*     settlement_bank_code: {
                required: '请填写支行联行号',
                maxlength: jQuery.validator.format("最多{0}个字")
            }, */
            settlement_bank_address: {
                required: '请选择开户银行所在地'
            },
            tax_registration_certificate: {
                required: '请填写税务登记证号',
                maxlength: jQuery.validator.format("最多{0}个字")
            }
        }
    });

    $('#btn_apply_credentials_next').on('click', function() {
        if($('#form_credentials_info').valid()) {
            $('#form_credentials_info').submit();
        }
    });

});
</script>
            
            
            
            
            
            
            
            
            
            


            <!--区别部分 END-->
        </div>
    </div>
</div>



{include file="public/mall_footer" /}