edithome.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: xiaofeng
  5. * Date: 2018/3/6
  6. * Time: 下午5:49
  7. */
  8. use backend\assets\AppAsset;
  9. AppAsset::addScript($this,Yii::$app->request->baseUrl.'/js/city.js');
  10. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/pinyinjs/dict/pinyin_dict_notone.js");
  11. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/pinyinjs/dict/pinyin_dict_withtone.js");
  12. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/pinyinjs/pinyinUtil.js");
  13. AppAsset::addScript($this,Yii::$app->request->baseUrl."/static/pinyinjs/simple-input-method/simple-input-method.js");
  14. ?>
  15. <style>
  16. .xm_qytc_box{width:650px;margin:auto;margin-top:20px;}
  17. .layui-form-item{margin-bottom:0;}
  18. .xm_qytc_input{width:429px;}
  19. .mt{margin-top:20px;}
  20. </style>
  21. <div class="xm_qytc_box">
  22. <!-- <hr class="layui-bg-blue">-->
  23. <form class="layui-form layui-form-pane" action="" >
  24. <?php if($model['pid'] != 0){ ?>
  25. <div class="layui-form-item">
  26. <label class="layui-form-label">主区域所属</label>
  27. <div class="layui-input-inline">
  28. <select name="cityid" lay-filter="aihao" >
  29. <option value="">请选择</option>
  30. <?php foreach ($all as $val){?>
  31. <?php if($val['id'] != $model['id']){?>
  32. <option value="<?php echo $val['id']?>" <?php if($val['id'] == $model['pid']) echo 'selected' ?>><?php echo $val['city_name']?> </option>
  33. <?php } }?>
  34. </select>
  35. </div>
  36. <p style="color: red;">格式:主区域所属:海南省 区域名称:三亚市 </p>
  37. </div>
  38. <?php } ?>
  39. <div style="height:20px"></div>
  40. <div class="layui-form-item">
  41. <label class="layui-form-label"><span style="color:red">*</span>区域名称:</label>
  42. <div class="layui-input-inline">
  43. <input type="text" name="city_name" value="<?php echo $model['city_name'] ?>" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input layui_w_name">
  44. </div>
  45. </div>
  46. <div style="height:20px"></div>
  47. <div class="layui-form-item">
  48. <label class="layui-form-label"><span style="color:red">*</span>区域拼音:</label>
  49. <div class="layui-input-inline">
  50. <input type="text" name="pinyin" value="<?php echo $model['pinyin'] ?>" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input layui_w_spell">
  51. </div>
  52. </div>
  53. <div style="height:20px"></div>
  54. <div class="layui-form-item">
  55. <label class="layui-form-label">经纬度:</label>
  56. <div class="layui-input-inline">
  57. <input type="text" name="ll" value="<?php echo $model['ll'] ?>" class="layui-input">
  58. </div>
  59. </div>
  60. <div style="height:20px"></div>
  61. <div class="layui-form-item">
  62. <label class="layui-form-label"><span style="color:red">*</span>所属国籍</label>
  63. <div class="layui-input-inline">
  64. <select name="abroad" lay-filter="aihao" >
  65. <option value="">请选择</option>
  66. <option value="1" <?php if($model['abroad'] == 1) echo 'selected'; ?> >国内</option>
  67. <option value="2" <?php if($model['abroad'] == 2) echo 'selected'; ?> >国外</option>
  68. </select>
  69. </div>
  70. </div>
  71. <?php if(Yii::$app->session['user_info']['user'] == 'admin'){ ?>
  72. <div style="height:20px"></div>
  73. <div class="layui-form-item">
  74. <label class="layui-form-label"><span style="color:red">*</span>A记录:</label>
  75. <div class="layui-input-inline">
  76. <input type="text" name="a" value="<?= $model['a'] ?>" lay-verify="required" autocomplete="off" class="layui-input layui_w_spell">
  77. </div>
  78. </div>
  79. <?php } ?>
  80. <div style="height:20px"></div>
  81. <div class="layui-form-item" style="margin-bottom:-5px">
  82. <div class="layui-inline" style="width:60%">
  83. <label class="layui-form-label">商务通:</label>
  84. <div class="layui-input-block">
  85. <textarea rows="6" name="dialogue" placeholder="请输入商务通" class="layui-textarea"><?= $model['dialogue'] ?></textarea>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="layui-form-item mt">
  90. <input type="hidden" name="id" value="<?php echo $model['id']?>">
  91. <button class="layui-btn" lay-submit="" lay-filter="editcity">修 改</button>
  92. </div>
  93. </form>
  94. </div>