edit.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <form id="form" action="{:url('store.chain/edit')}">
  2. <input type="hidden" name="id" value="{$info.id}"/>
  3. <input type="hidden" name="store_id" value="{$store_id}"/>
  4. <table class="formtable">
  5. <tr><th>门店名称:</th><td><input class="input w400" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  6. <tr><th>门店地址:</th><td>
  7. <input class="input w350" datatype="*" type="text" name="address" value="{$info.address}" />
  8. <button type="button" class="button button-green lib"><i class="iconfont icon-address_icon"></i>读取经纬</button>
  9. </td></tr>
  10. <tr><th>经纬度:</th><td>
  11. <input readonly="true" autocomplete="off" class="input w100 readonly" datatype="*" type="text" name="longitude" value="{$info.longitude}" />
  12. <input readonly="true" autocomplete="off" class="input w100 readonly" datatype="*" type="text" name="latitude" value="{$info.latitude}" />
  13. <span class="gray"><i class="iconfont icon-address_icon"></i>地址请包含<span class="red">省市地区</span>完整地址,方便位置定位判断</span>
  14. </td></tr><tr><th>门店电话:</th><td><input class="input" datatype="*" type="text" name="telphone" value="{$info.telphone}" /></td></tr>
  15. <tr>
  16. <th></th>
  17. <td>
  18. <input type="submit" value="确定" class="button button-blue submit" />
  19. <input type="reset" value="重置" class="button button-blank"/>
  20. </td>
  21. </tr>
  22. </table>
  23. </form>
  24. <script type="text/javascript">
  25. Do('base','layer','form',function(){
  26. $('#form').isForm();
  27. $(".lib").click(function () {
  28. var val = $("input[name='address']").val();
  29. if(val == "" || val == null || val == undefined){
  30. parent.layer.alert('好店地址必须填写');
  31. }else{
  32. $(this).popup({'url':'{:url("ais/store.index/baidu")}?address='+val,area: ['60%','550px']});
  33. }
  34. });
  35. })
  36. function setPoint(point){
  37. $("input[name='longitude']").val(point.lng);
  38. $("input[name='latitude']").val(point.lat);
  39. }
  40. </script>