address_add

<include file="Header:header-address_add" />
<include file="Header:header-public" />
<include file="User:home-public" />
<div class="uc-bd">
<div class="wide pr vrh uc-layer">
    <!--left -->
    <div class="flp lw">
        <include file="Public:left_nav" />
    </div>
    
    <!--rignt -->
    <div class="frp rw">
        
    <!--tab --> 
        <div class="uc-tabbar-wrap">   
            <div class="uc-tabbar-inner-wrap">
                     <ul class="uc-tabbar" id="J_TabBar">
                         <li id="Atb_11" class="selected" style="margin-left:30px;">
                         <span class="uc-tab-anchor">添加发货地址</span>
                         <div class="tb-selected-indicator"></div>
                         </li>  
                   </ul>
            </div>
       </div>
       <!--tab end -->
       <div class="ivs-hd">
                <h2>温馨提示:</h3>
                <p>1、请正确的填写发货信息,因为发货信息错误而导致空包出问题,一概不负责!</p>
                <p>2、设置发货地时,如出现缺少地区,请及时联系在线客服添加!</p>
            </div>
       
        <div class="log-con">
            
            <!--end -->
            <!--FORM table -->
        <div class="form-edit-table pb20">
            <form  id="address_form"  action="{:U('User/address_save')}" method="POST">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab">
                             <tr>
                                 <td align="right">收货人姓名:</td>
                                 <td width="85%"> <input type="text"  name="name" class="edit-input w130" /> <span class="numcolor">*</span><span id="realnameSpan" style="color:#999999">请输入姓名</span></td>
                             </tr>
                             <tr>
                                 <td align="right">手机号码:</td>
                                 <td> <input type="text" name="shouji"  class="edit-input w130" /> <span class="numcolor">*</span><span id="telmSpan" style="color:#999999">请输入联系手机</span></td>
                             </tr>
                             <tr>
                                 <td align="right">电话号码:</td>
                                 <td> <input type="text"   name="phone" class="edit-input w130" /> <span class="numcolor">*</span><span id="telSpan" style="color:#999999">请输入联系电话</span></td>
                             </tr>
                             <tr>
                                <td align="right">具体地址:</td> 
                                  <td>    
                                        <select id="s_province"  class="ec_linkSelect" name="address_province"></select>&nbsp;&nbsp;
                                        <select id="s_city"  class="ec_linkSelect" name="address_city" ></select>&nbsp;&nbsp;
                                        <select id="s_county"  class="ec_linkSelect" name="address_district"></select>&nbsp;&nbsp;<span class="numcolor">*</span><span id="addressSpan" style="color:#999999">请选择地址</span>
                                   </td>
                            </tr>
                            <tr>
                                <td  align="right"></td> 
                                <td>
                                       <input name="address" class="edit-input w480" id="address" type="text" onfocus="address_focus()" onblur="address_blur()" class="input0" value="填写街道地址(可为空)" size="30" />
                                       <script type="text/javascript" src="__PUBLIC__/js/area.js"></script>
                                       <script type="text/javascript">_init_area();</script>
                                    </td>
                            </tr>
                            <tr>
                                 <td align="right">邮编:</td>
                                 <td> <input type="text"   name="zipcode"   id="zipcode" class="edit-input w130" /></td>
                             </tr> 
                             <tr>
                                 <td></td>
                                 <td><input type="submit" value="确认保存" class="button-action-ok" /> <a href="{:U('User/address')}" onclick="add_address()" class="">返回地址列表</a></td>
                             </tr> 
                        </table>
                        <input type="hidden" name="user_id" value="{$user['id']}">
                       </form>
        
        </div>
    
    </div>

    </div>
    
</div>
</div>



<div class="wide ptb20" >
    <!--left -->
    <include file="Public:left_nav" />
    <!--left end -->
    <!--right begin -->
    
    <!--right end -->
</div>    
<!--index end -->
<!---******************************************************* -->

<script type="text/javascript" src="__PUBLIC__/js/jquery.validation.min.js"></script>
<script type="text/javascript"> 
   function address_focus()
   {
       $('#address').val(''); 
   }
   function address_blur()
   {
     if($("#address").val()=='')
          {
                $("#address").val('填写街道地址(可为空)');
          }     
   }
 $(function(){  
    $("#address_form").validate({
        errorPlacement: function(error, element){
            var error_td = element.parent('td');
            error_td.find('label').hide();
            error_td.append(error);
        },
        submitHandler:function(form){ 
            ajaxpost('address_form', '', '', 'onerror');
        },
        rules : {
            name : {
                required : true 
             } ,
            shouji : {
                required : true 
            },
           address_province:
           {
                 required : true
           },
          address_city:
           {
                 required : true
           },
           address_district:
           {
                 required : true
           } 
        },
        messages : {
            name : {
                required : '姓名不能为空' 
            },
            shouji  : {
                required : '手机不能为空' 
            },
            address_province : {
                required : '请选择发货省'
            },
               address_city : {
                required : '请选择发货市'
            },
               address_district : {
                required : '请选择发货地区'
            } 
        }
    });
});
</script>
<include file="Public:footer" /> 

address

<include file="Header:header-address" />
<include file="Header:header-public" />
<include file="User:home-public" />
<div class="uc-bd">
<div class="wide pr vrh uc-layer">
    <!--left -->
    <div class="flp lw">
        <include file="Public:left_nav" />
    </div>
    
    <!--rignt -->
    <div class="frp rw">
        
    <!--tab --> 
        <div class="uc-tabbar-wrap">   
            <div class="uc-tabbar-inner-wrap">
                     <ul class="uc-tabbar" id="J_TabBar">
                         <li id="Atb_11" class="selected" style="margin-left:30px;">
                         <span class="uc-tab-anchor">发货地址管理</span>
                         <div class="tb-selected-indicator"></div>
                         </li>  
                   </ul>
            </div>
       </div>
       <!--tab end -->
       
       <div class="ivs-hd">
                <h2>温馨提示:</h3>
                <p>1、请正确的填写发货信息,因为发货信息错误而导致空包出问题,一概不负责!</p>
                <p>2、设置发货地时,如出现缺少地区,请及时联系在线客服添加!</p>
            </div>
       
        <div class="log-con">
         
            
            <!-- -->
            <div class="pb20" style="text-align:right"><a href="{:U('User/address_add')}" onclick="add_address()" class="btn">【新增发货地址】</a></div>
            
            <div class="address-m">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabfh-list">
                    <thead>
                            <tr class="bgcolor01 bb">
                                <th align="center" width="10%">收货人</th>
                                <th align="center" width="10%">手机</th>
                                <th  align="center" width="10%">固话</th>
                                <th  align="center">具体地址</th>
                                <th  width="8%">默认</th>
                                <th   align="center" width="25%">操作</th> 
                            </tr> 
                        </thead>
                        <tbody>    
                          <foreach name="address_list" item="address">
                                  <tr  class="bb">
                                         <td class="pl10" align="center">{$address['name']}</td>
                                         <td  align="center">{$address['shouji']}</td>
                                         <td  align="center">{$address['phone']}</td>
                                         <td  align="center">{$address['address']}</td>
                                         <td>
                                                 <switch name="address.is_default" >
                                                      <case value="0"><span class="numcolor">否</span></case>
                                                       <case value="1"><span class="numcolor">是</span></case>
                                                 </switch> 
                                         </td>
                                         <td>
                                                <a href="{:U('User/address_edit',array('id'=>$address['id']))}">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                                <a href="{:U('User/address_del',array('id'=>$address['id']))}">删除</a>&nbsp;&nbsp;
                                                <a class="btn-small " href="javascript:void(0)" onclick="set_default('{$address['id']}')">设为默认</a>
                                         </td> 
                                  </tr>
                           </foreach>
                          </tbody>
                        </table> 
                   </div>
    
    </div>

    </div>
    
</div>
</div>
 
<script type="text/javascript">
    function set_default(id)
    {
         if(confirm('确认将此地址信息为默认发货地址吗?'))
         {
              $.post("{:U('address_default')}",{id:id},function(data,status)
              { 
                   if(data.status==1)
                   {
                        document.location.reload();
                   }
                   else
                   {
                       alert(data.info);
                   }
              },'json');
         }
         else
         {
             return false;
         }
    }
</script>
<include file="Public:footer" /> 

left-menu

<div class="mc-menu-area">
    <div class="htitle">
        <a href="member.asp">管理中心</a>
    </div>
    <div class="b">
        <ul>
            <li>
                <h3>
                    <span>我的业务</span>
                </h3>
                <ol>
                    <li class=""><a href="buykongbao.asp?current=buykongbao" title="我要购买空包"><span>购买空包<em>B</em></span></a></li>
                    <li class=""><a href="waitforsend.asp?current=dengdaifahuo" title="等待发货"><span>等待发货</span></a></li>
                    <li class=""><a href="kbsent.asp?current=yifahuo" title="已经发货"><span>已经发货</span></a></li>
                    <li class=""><a href="address.asp?current=address"><span>设置发货地址</span></a></li>
                    <li class=""><a href="didan.asp?current=didan"><span>申请底单</span></a></li>
                    <li class=""><a href="mydidan.asp?current=mydidan"><span>我的底单</span></a></li>
                </ol>
            </li>
            <li>
                <h3>
                    <span>财务管理</span>
                </h3>
                <ol>
                    <li class=""><a href="chongzhi.asp?current=chongzhi"><span>账户充值<em>P</em></span></a></li>
                    <li class=""><a href="xfrecord.asp?current=xfrecord">交易记录</a></li>
                    <li class=""><a href="czrecord.asp?current=czrecord">充值明细</a></li>
                    <li class=""><a href="txrecord.asp?current=txrecord">提现记录</a></li>
                </ol>
            </li>
            <li>
                <h3>
                    <span>帐号管理</span>
                </h3>
                <ol>
                    <li class=""><a href="upgr.asp?current=upgr">升级会员</a></li>
                    <li class=""><a href="nmembers.asp?current=nmembers">我的下线</a></li>
                    <li class=""><a href="profile.asp?current=profile">修改资料</a></li>
                    <li class=""><a href="chgpwd.asp?current=chgpwd">修改密码</a></li>
                    <li class=""><a href="bind.asp?current=bind">绑定支付宝</a></li>
                    <li class=""><a href="tixian.asp?current=tixian">我要提现</a></li>
                    <li class=""><a href="logout.asp?current=logout">退出登录</a></li>
                </ol>
            </li>
        </ul>
    </div>
</div>

 

posted @ 2016-03-22 23:53  iicoo  阅读(512)  评论(0编辑  收藏  举报