returnPost.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. {template '_header'}
  2. <script type="text/javascript" src="/static/js/dist/area/cascade.js"></script>
  3. <div class="page-header">
  4. 当前位置:
  5. <span class="text-primary">
  6. <?php if( !empty($item['id'])){ ?>编辑<?php }else{ ?>添加<?php } ?>退货地址 <small><?php if( !empty($item['id'])){ ?>修改【{$item['title']}】<?php } ?></small>
  7. </span>
  8. </div>
  9. <div class="page-content">
  10. <div class="page-sub-toolbar">
  11. <span class='pull-right'>
  12. <a class="btn btn-primary btn-sm" href="{:U('config/address.addreturn')}">添加退货地址</a>
  13. </span>
  14. </div>
  15. <form class="form-horizontal form-validate" enctype="multipart/form-data">
  16. <input type="hidden" name="id" value="{$item['id']}" />
  17. <div class="form-group">
  18. <label class="col-sm-2 control-label must">退货地址名称</label>
  19. <div class="col-sm-9 col-xs-12">
  20. <input type="text" id='title' name="title" class="form-control" value="{$item['title']}" data-rule-required='true' />
  21. </div>
  22. </div>
  23. <div class="form-group">
  24. <label class="col-sm-2 control-label must">联系人</label>
  25. <div class="col-sm-9 col-xs-12">
  26. <input type="text" id='name' name="name" class="form-control" value="{$item['name']}" required style="width: 300px;"/>
  27. </div>
  28. </div>
  29. <div class="form-group">
  30. <label class="col-sm-2 control-label must">手机</label>
  31. <div class="col-sm-9 col-xs-12">
  32. <input type="text" id='mobile' name="mobile" class="form-control" value="{$item['mobile']}" style="width: 300px;"/>
  33. </div>
  34. </div>
  35. <div class="form-group">
  36. <label class="col-sm-2 control-label">电话</label>
  37. <div class="col-sm-9 col-xs-12">
  38. <input type="text" id='tel' name="tel" class="form-control" value="{$item['tel']}" style="width: 300px;"/>
  39. </div>
  40. </div>
  41. <div class="form-group">
  42. <label class="col-sm-2 control-label">邮编</label>
  43. <div class="col-sm-9 col-xs-12">
  44. <input type="text" id='zipcode' name="zipcode" class="form-control" value="{$item['zipcode']}" style="width: 300px;"/>
  45. </div>
  46. </div>
  47. <?php if( !empty($item['id'])){ ?>
  48. <div class="form-group">
  49. <label class="col-sm-2 control-label">地址</label>
  50. <div class="col-sm-9 col-xs-12">
  51. <div class='form-control-static'>{php echo $item['province']} {php echo $item['city']} {php echo $item['area']}</div>
  52. </div>
  53. </div>
  54. <?php } ?>
  55. <div class="form-group">
  56. <label class="col-sm-2 control-label must"><?php if( !empty($item['id'])){ ?>新<?php } ?>地址</label>
  57. <div class="col-sm-9 col-xs-12">
  58. <p>
  59. <select id="sel-provance" name="province" onChange="selectCity();" class="select form-control" style="width:130px;display:inline;">
  60. <option value="" selected="true">省/直辖市</option>
  61. </select>
  62. <select id="sel-city" name="city" onChange="selectcounty(0)" class="select form-control" style="width:135px;display:inline;">
  63. <option value="" selected="true">请选择</option>
  64. </select>
  65. <select id="sel-area" name="area" class="select form-control" style="width:130px;display:inline;">
  66. <option value="" selected="true">请选择</option>
  67. </select>
  68. </p>
  69. <p>
  70. <input type="text" name="address" id="address" class="form-control" style="width:300px;margin-top: 10px;" required value="{php echo $item['address']}">
  71. </p>
  72. </div>
  73. </div>
  74. <div class="form-group">
  75. <label class="col-sm-2 control-label ">是否默认</label>
  76. <div class="col-sm-9 col-xs-12">
  77. <label class='radio-inline'>
  78. <input type='radio' name='isdefault' id="isdefault1" value='1' <?php if( $item['isdefault']==1){ ?>checked<?php } ?> /> 是
  79. </label>
  80. <label class='radio-inline'>
  81. <input type='radio' name='isdefault' id="isdefault0" value='0' <?php if( $item['isdefault']==0){ ?>checked<?php } ?> /> 否
  82. </label>
  83. </div>
  84. </div>
  85. <div class="form-group">
  86. <label class="col-sm-2 control-label "></label>
  87. <div class="col-sm-9 col-xs-12">
  88. <input type="submit" value="提交" class="btn btn-primary" />
  89. <input type="button" name="back" onclick="javascript:window.location.href='{:U('config/address.returned')}'" value="返回列表" class="btn btn-default" />
  90. </div>
  91. </div>
  92. </form>
  93. </div>
  94. <script language='javascript'>
  95. $(function(){
  96. cascdeInit("{php echo $new_area}","0","{php echo $item['province']}","{php echo $item['city']}","{php echo $item['area']}");
  97. });
  98. function formcheck() {
  99. if ($("#title").isEmpty()) {
  100. Tip.focus("title", "请填写退货地址名称!", "top");
  101. return false;
  102. }
  103. if ($("#name").isEmpty()) {
  104. Tip.focus("name", "请填写联系人!", "top");
  105. return false;
  106. }
  107. if ($("#mobile").isEmpty()) {
  108. Tip.focus("mobile", "请填写手机!", "top");
  109. return false;
  110. }
  111. if($('#sel-province').val()=='请选择省份') {
  112. Tip.focus("sel-province", "请选择省份!", "top");
  113. return false;
  114. }
  115. if ($("#address").isEmpty()) {
  116. Tip.focus("address", "请填写地址!", "top");
  117. return false;
  118. }
  119. return true;
  120. }
  121. </script>
  122. {template '_footer'}