25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

321 lines
14 KiB

  1. <?php
  2. /**
  3. *
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 张帅
  12. * PhpStorm poi-info.php
  13. * Create By 2016/12/13 11:04 $
  14. */
  15. use backend\modules\zzcs\assets\ZzcsAsset;
  16. use yii\helpers\Html;
  17. ZzcsAsset::addCss($this, '/station/css/poi_info.css');
  18. ZzcsAsset::addScript($this, '/station/js/poi_info.js');
  19. ZzcsAsset::addScript($this, '/plug/layer/layer.js');
  20. ?>
  21. <div class="title_add"><?= Html::encode($this->title) ?></div>
  22. <div class="line_top"></div>
  23. <div class="content_header">基本信息</div>
  24. <table class="table_info">
  25. <tbody>
  26. <tr class="tr1">
  27. <td class="td1">
  28. <span class="necessary">*</span>
  29. <?php
  30. if ($station_type == 'station') {//站点
  31. echo '站点名称:';
  32. } else {//区域
  33. echo '区域名称:';
  34. }
  35. ?>
  36. </td>
  37. <!--展示-->
  38. <td class="td2">
  39. <?php if ($opera == 'show') { ?>
  40. <span><?php echo $station_info['station_name']; ?></span>
  41. <!--添加-->
  42. <?php } else { ?>
  43. <input type="text" id="station_name"
  44. <?php if ($opera == 'update') {
  45. //修改
  46. echo 'value="' . $station_info['station_name'] . '"';
  47. } ?>
  48. >
  49. <?php } ?>
  50. </td>
  51. </tr>
  52. <?php if ($station_type == 'station') { ?>
  53. <tr class="tr2">
  54. <td class="td1"><span class="necessary">*</span>坐标:</td>
  55. <td class="td2">
  56. <span class="longitude">经度:</span>
  57. <!--展示-->
  58. <?php if ($opera == 'show') {
  59. echo '<span class="show_x_y">' . $station_info['longitude'] . '</span>';
  60. } else { ?>
  61. <!--添加-->
  62. <input type="text" id="longitude"
  63. <?php if ($opera == 'update') {
  64. //修改
  65. echo 'value="' . $station_info['longitude'] . '"';
  66. } ?>
  67. >
  68. <?php } ?>
  69. <span class="latitude">纬度:</span>
  70. <!--展示-->
  71. <?php if ($opera == 'show') {
  72. echo '<span class="show_x_y">' . $station_info['latitude'] . '</span>';
  73. } else { ?>
  74. <!--添加-->
  75. <input type="text" id="latitude"
  76. <?php if ($opera == 'update') {
  77. //修改
  78. echo 'value="' . $station_info['latitude'] . '"';
  79. } ?>
  80. >
  81. <?php } ?>
  82. </td>
  83. </tr>
  84. <tr class="tr3">
  85. <td class="td1"></td>
  86. <td class="td2">坐标地址查询:<a target="_blank" href="http://api.map.baidu.com/lbsapi/getpoint/index.html">http://api.map.baidu.com/lbsapi/getpoint/index.html</a>
  87. </td>
  88. </tr>
  89. <?php } ?>
  90. <tr class="tr4">
  91. <td class="td1"><span class="necessary">*</span>所属区域:</td>
  92. <td class="td2 range">
  93. <!--添加-->
  94. <?php if ($opera == 'add') { ?>
  95. <select id="range0" list_order='0' onchange="changeRange(this)">
  96. <option value="-1">请选择</option>
  97. <?php foreach ($range as $key => $vel) { ?>
  98. <option value="<?php echo $vel['area_id']; ?>">
  99. <?php echo $vel['area_name']; ?>
  100. </option>
  101. <?php } ?>
  102. </select>
  103. <!--修改-->
  104. <?php } elseif ($opera == 'update') { ?>
  105. <?php if (count($station_info['range_arr']) > 0) { ?>
  106. <select id="range0" list_order='0' onchange="changeRange(this)">
  107. <option value="-1">请选择</option>
  108. <?php foreach ($range as $range_key => $range_vel) { ?>
  109. <option
  110. value="<?php echo $range_vel['area_id']; ?>"
  111. <?php if ($range_vel['area_id'] == $station_info['range_arr'][0]) {
  112. echo 'selected="selected"';
  113. } ?>
  114. >
  115. <?php echo $range_vel['area_name']; ?>
  116. </option>
  117. <?php } ?>
  118. </select>
  119. <?php foreach ($station_info['range_arr'] as $key => $vel) { ?>
  120. <?php if (isset($station_info['rang_list_arr'][$vel])) { ?>
  121. <select id="range<?php echo $key + 1; ?>" list_order='<?php echo $key + 1; ?>'
  122. onchange="changeRange(this)">
  123. <option value="-1">请选择</option>
  124. <?php foreach ($station_info['rang_list_arr'][$vel] as $range_key => $range_vel) { ?>
  125. <option
  126. value="<?php echo $range_vel['area_id']; ?>"
  127. <?php if (isset($station_info['range_arr'][$key + 1])) { ?>
  128. <?php if ($range_vel['area_id'] == $station_info['range_arr'][$key + 1]) {
  129. echo 'selected="selected"';
  130. } ?>
  131. <?php } ?>
  132. >
  133. <?php echo $range_vel['area_name']; ?>
  134. </option>
  135. <?php } ?>
  136. </select>
  137. <?php } ?>
  138. <?php } ?>
  139. <?php } else { ?>
  140. <select id="range0" list_order='0' onchange="changeRange(this)">
  141. <option value="-1">请选择</option>
  142. <?php foreach ($range as $key => $vel) { ?>
  143. <option value="<?php echo $vel['area_id']; ?>">
  144. <?php echo $vel['area_name']; ?>
  145. </option>
  146. <?php } ?>
  147. </select>
  148. <?php } ?>
  149. <!--展示-->
  150. <?php } else {
  151. if (count($station_info['range_arr']) != 0) {
  152. foreach ($station_info['range_arr'] as $key => $vel) {
  153. echo '<span rang_id="' . $vel['area_id'] . '" class="show_range">' . $vel['area_name'] . '</span>';
  154. }
  155. }
  156. } ?>
  157. </td>
  158. </tr>
  159. <?php if ($station_type == 'station') { ?>
  160. <tr class="tr5">
  161. <td class="td1"><span class="necessary">*</span>地址:</td>
  162. <td class="td2">
  163. <!--展示-->
  164. <?php if ($opera == 'show') {
  165. echo '<span>' . $station_info['address'] . '</span>';
  166. } else { ?>
  167. <!--添加-->
  168. <input type="text" id="address"
  169. <?php if ($opera == 'update') {
  170. //修改
  171. echo 'value="' . $station_info['address'] . '"';
  172. } ?>
  173. >
  174. <?php } ?>
  175. </td>
  176. </tr>
  177. <?php } ?>
  178. <tr class="tr6">
  179. <td class="td1">类型:</td>
  180. <td class="td2 poi_type">
  181. <!--添加-->
  182. <?php if ($opera == 'add') { ?>
  183. <?php foreach ($poi_type as $key => $vel) { ?>
  184. <label class="poi_type_one">
  185. <span><?php echo $vel['station_type_name']; ?></span>
  186. <input type="checkbox" class="poi_type_check" value="<?php echo $vel['station_type_id']; ?>">
  187. </label>
  188. <?php } ?>
  189. <!--修改-->
  190. <?php } elseif ($opera == 'update') { ?>
  191. <?php if (count($station_info['poi_type_arr']) > 0) { ?>
  192. <?php foreach ($station_info['poi_type_arr'] as $key => $vel) {
  193. $poi_type_arr[$vel] = $vel;
  194. } ?>
  195. <?php } else {
  196. $poi_type_arr = [];
  197. } ?>
  198. <?php foreach ($poi_type as $key => $vel) { ?>
  199. <label class="poi_type_one">
  200. <span><?php echo $vel['station_type_name']; ?></span>
  201. <input type="checkbox" class="poi_type_check"
  202. <?php if (isset($poi_type_arr[$vel['station_type_id']])) {
  203. echo 'checked = "checked"';
  204. } ?>
  205. value="<?php echo $vel['station_type_id']; ?>"
  206. >
  207. </label>
  208. <?php } ?>
  209. <!--展示-->
  210. <?php } else {
  211. if (count($station_info['poi_type_arr']) != 0) {
  212. foreach ($station_info['poi_type_arr'] as $key => $vel) {
  213. echo '<span station_type_id="' . $vel['station_type_id'] . '" class="show_poi_type">' . $vel['station_type_name'] . '</span>';
  214. }
  215. }
  216. } ?>
  217. </td>
  218. </tr>
  219. <?php if ($opera != 'add' && ($storage_type == 'audit' || $storage_type == 'reapply')) { ?>
  220. <tr class="tr7">
  221. <td class="td1"><span class="necessary">*</span>审核结果:</td>
  222. <td class="td2 ">
  223. <span><?php echo $station_info['check_status']; ?></span>
  224. </td>
  225. </tr>
  226. <?php } elseif ($opera == 'show' && $storage_type == 'check') { ?>
  227. <tr class="tr7">
  228. <td class="td1"><span class="necessary">*</span>审核结果:</td>
  229. <td class="td2 ">
  230. <select id="check_status">
  231. <option value="0">请选择</option>
  232. <option value="1">通过</option>
  233. <option value="2">不通过</option>
  234. </select>
  235. </td>
  236. </tr>
  237. <?php } ?>
  238. <?php if (($opera == 'add' && $storage_type == 'audit') || ($opera == 'update' && $storage_type == 'reapply')) { ?>
  239. <tr class="tr8">
  240. <td class="td1"><span class="necessary">*</span>申请理由:</td>
  241. <td class="td2 audit_text">
  242. <textarea id="audit_text" cols="40" rows="4"></textarea>
  243. </td>
  244. </tr>
  245. <?php } elseif ($opera == 'show' && $storage_type == 'check') { ?>
  246. <tr class="tr8">
  247. <td class="td1"><span class="necessary">*</span>审核说明:</td>
  248. <td class="td2 audit_text">
  249. <textarea id="audit_text" cols="40" rows="4"></textarea>
  250. </td>
  251. </tr>
  252. <?php } ?>
  253. <?php if (($opera != 'add' && $storage_type != 'formal') || ($opera == 'show' && $storage_type == 'check')) { ?>
  254. <tr class="tr9">
  255. <td class="td1">日志:</td>
  256. <td class="td2 audit_log">
  257. <span><?php echo $station_info['check_log']; ?></span>
  258. </td>
  259. </tr>
  260. <?php } ?>
  261. </tbody>
  262. </table>
  263. <div class="opera_btn">
  264. <!-- 添加/修改-->
  265. <?php if ($opera != 'show' && $storage_type != 'reapply') { ?>
  266. <?php
  267. $btn_id = $opera . '_' . $station_type . '_' . $storage_type;
  268. $btn_onclick = $opera . '_' . $station_type . '_' . $storage_type;
  269. ?>
  270. <span class="btn-primary" id="<?php echo $btn_id; ?>"
  271. onclick="<?php echo $btn_onclick; ?>(<?php if ($opera == 'update') echo $station_info['station_id']; ?>)"
  272. <?php if ($opera == 'update') {
  273. echo 'station_id="' . $station_info['station_id'] . '"';
  274. } ?>
  275. >
  276. <?php if ($opera == 'add') {
  277. if ($storage_type == 'formal') {
  278. echo '保存';
  279. } else {//审核
  280. echo '提交审核';
  281. }
  282. } else {
  283. echo '确认';
  284. } ?>
  285. </span>
  286. <?php } elseif ($opera == 'show' && $storage_type == 'check') { ?>
  287. <?php if ($station_type == 'station') { ?>
  288. <span class="btn-primary" id="check_station"
  289. onclick="checkStation(<?php echo $station_info['station_id']; ?>)">审核站点</span>
  290. <?php } else { ?>
  291. <span class="btn-primary" id="check_range"
  292. onclick="checkRange(<?php echo $station_info['station_id']; ?>)">审核区域</span>
  293. <?php } ?>
  294. <?php } elseif ($opera == 'update' && $storage_type == 'reapply'){ ?>
  295. <?php if ($station_type == 'station') { ?>
  296. <span class="btn-primary" id="reapply_station"
  297. onclick="reapplyStation(<?php echo $station_info['station_id']; ?>)">重新申请</span>
  298. <?php } else { ?>
  299. <span class="btn-primary" id="reapply_range"
  300. onclick="reapplyRange(<?php echo $station_info['station_id']; ?>)">重新申请</span>
  301. <?php } ?>
  302. <?php }?>
  303. <span class="btn-primary" id="add_range" onclick="window.top.close();">
  304. <?php
  305. if ($opera != 'show') {
  306. echo '取消';
  307. } else {
  308. echo '关闭';
  309. }
  310. ?>
  311. </span>
  312. </div>