123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <script type="text/javascript" src="/static/js/dist/area/cascade.js"></script>
- <style type='text/css'>
- .select-group {height: 28px;padding-top:2px;}
- </style>
- <form class="form-horizontal form-validate" action="{:U('order/opchangeaddress')}" method="post" enctype="multipart/form-data">
- <input type='hidden' name='id' value='{$id}' />
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button data-dismiss="modal" class="close" type="button">×</button>
- <h4 class="modal-title">编辑收货信息</h4>
- </div>
- <div class="modal-body">
- <div class="form-group">
- <label class="col-sm-2 control-label">收货人 :</label>
- <div class="col-sm-9 col-xs-12">
- <input type="text" name="realname" class="form-control" value="{$item['shipping_name']}" data-rule-required='true' />
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">手机 :</label>
- <div class="col-sm-9 col-xs-12">
- <input type="text" name="mobile" class="form-control" value="{$item['shipping_tel']}" data-rule-required='true' />
- </div>
- </div>
- <div class="form-group dispatch_info">
- <label class="col-sm-2 control-label">修改地址 :</label>
- <div class="col-sm-9 col-xs-12">
- <label class="radio-inline"><input type="radio" name="changead" value="0" checked="true"/> 否</label>
- <label class="radio-inline"><input type="radio" name="changead" value="1" /> 是</label>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group ad-group" style="display: none;">
- <label class="col-sm-2 control-label">地址 :</label>
- <div class="col-sm-9 col-xs-12">
- <span class="help-block">{$item['shipping_address']}</span>
- </div>
- </div>
- <div class="form-group ad-group" style="display: none;">
- <label class="col-sm-2 control-label">新地址 :</label>
- <div class="col-sm-9 col-xs-12">
- <p>
- <select id="sel-provance" name="province" onChange="selectCity();" class="select form-control select-group" style="width:123px;display:inline;">
- <option value="" selected="true">省/直辖市</option>
- </select>
- <select id="sel-city" name="city" onChange="selectcounty(0)" class="select form-control select-group" style="width:135px;display:inline;">
- <option value="" selected="true">请选择</option>
- </select>
- <select id="sel-area" name="area" onChange="selectstreet(0)" class="select form-control select-group" style="width:130px;display:inline;">
- <option value="" selected="true">请选择</option>
- </select>
-
- </p>
- <input type="text" name="address" id="address_detail" class="form-control" value="{$item['shipping_address']}" data-rule-required='true' />
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button class="btn btn-primary" id="sub_form" type="submit">保存</button>
- <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
- </div>
- </div>
- </div>
- </form>
- <script language="javascript">
- $(function () {
- $(':radio[name=changead]').click(function () {
- var type = $("input[name='changead']:checked").val();
- if (type == '1') {
- $('.ad-group').show();
- } else {
- $('.ad-group').hide();
- }
- });
-
-
- $('#sub_form').click(function(){
- var type = $("input[name='changead']:checked").val();
-
- if(type == 1)
- {
- var provance = $('#sel-provance').val();
- var city = $('#sel-city').val();
- var area = $('#sel-area').val();
-
- if( provance == '请选择省份' )
- {
- alert('请选择省份');
- return false;
- }
-
- if( area == '市辖区' )
- {
- alert('请选择市辖区');
- return false;
- }
-
- }
- var address_detail = $('#address_detail').val();
-
- if( address_detail == '' )
- {
- alert('请填写详细地址');
- return false;
- }
-
-
- })
-
- })
- //opchangeaddress
- cascdeInit("0","{php echo $item['shipping_address']}","{php echo isset($province_info['name'])?$province_info['name']:''}","{php echo isset($city_info['name'])?$city_info['name']:''}","{php echo isset($area_info['name'])?$area_info['name']:''}","{php echo '';");
- // cascdeInit("1","1","{$item['province_name']}","{$item['city_name']}","{$item['area_name']}","{$item['country_name']}");
- </script>
|