edit.html 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <form id="form" action="{:url('device/edit')}">
  2. <input type="hidden" name="id" value="{$info.id}"/>
  3. <input type="hidden" name="manage_uid" value="{$info.manage_uid}"/>
  4. <table class="formtable">
  5. {if $founder}
  6. <tr><th>运营商:</th><td>
  7. <select class="select w180" datatype="*" name="operate_id" class="select">
  8. <option value="">--请选择运营商--</option>
  9. {foreach $operate as $vo}<option value="{$vo.id}" {if $vo.id == $info.operate_id}selected{/if}>{$vo.operate_name}</option>{/foreach}
  10. </select>
  11. </td></tr>
  12. {/if}
  13. <tr><th>设备编号:</th>
  14. <td>
  15. <input class="input" datatype="n" type="text" name="device_id" value="{$info.device_id}" />
  16. </td>
  17. </tr>
  18. <tr><th>管理员:</th>
  19. <td>
  20. <input readonly="readonly" id="manage_uid" class="readonly input w100" type="text" name="manage_uid" value="{$info.manage_uid}" />
  21. <button url="{:url('green/device/selectManage',['input' => 'manage_uid'])}" type="button" class="selectPopup button"><i class="iconfont icon-my_icon"></i>选择用户</button>
  22. {if $info.manage_uid}
  23. <button url="{:url('green/device/review',['uid' => $info.manage_uid])}" type="button" class="selectPopup button button-blue"><i class="iconfont icon-search_icon"></i>预览</button>
  24. {/if}
  25. </td>
  26. </tr>
  27. <tr><th>名称:</th><td><input class="input w400" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
  28. <tr><th>地址:</th><td>
  29. <input class="input w350" datatype="*" type="text" name="address" value="{$info.address}" />
  30. <button type="button" class="button button-green lib"><i class="iconfont icon-address_icon"></i>读取经纬</button>
  31. <input autocomplete="off" class="input w100" datatype="*" type="text" name="longitude" value="{$info.longitude}" />
  32. <input autocomplete="off" class="input w100" datatype="*" type="text" name="latitude" value="{$info.latitude}" /> <br />
  33. <span class="gray"><i class="iconfont icon-address_icon"></i>地址请包含<span class="red">省市地区</span>完整地址,方便位置定位判断</span>
  34. </td></tr>
  35. <tr>
  36. <th></th>
  37. <td>
  38. <input type="submit" value="确定" class="button button-blue submit" />
  39. <input type="reset" value="重置" class="button button-blank"/>
  40. </td>
  41. </tr>
  42. </table>
  43. </form>
  44. <script type="text/javascript">
  45. Do('base','layer','form','tpl',function(){
  46. $('#form').isForm();
  47. $(".selectPopup").win();
  48. $(".lib").click(function () {
  49. var val = $("input[name='address']").val();
  50. if(val == "" || val == null || val == undefined){
  51. parent.layer.alert('好店地址必须填写');
  52. }else{
  53. $(this).popup({'url':'{:url("green/device/baidu")}?address='+val,area: ['60%','550px']});
  54. }
  55. });
  56. bindEvent();
  57. })
  58. function setPoint(point){
  59. $("input[name='longitude']").val(point.lng);
  60. $("input[name='latitude']").val(point.lat);
  61. }
  62. </script>