|
- <?php
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 张帅
- * PhpStorm poi-info.php
- * Create By 2016/12/13 11:04 $
- */
- use backend\modules\zzcs\assets\ZzcsAsset;
- use yii\helpers\Html;
-
- ZzcsAsset::addCss($this, '/station/css/poi_info.css');
- ZzcsAsset::addScript($this, '/station/js/poi_info.js');
- ZzcsAsset::addScript($this, '/plug/layer/layer.js');
- ?>
- <div class="title_add"><?= Html::encode($this->title) ?></div>
- <div class="line_top"></div>
- <div class="content_header">基本信息</div>
- <table class="table_info">
- <tbody>
- <tr class="tr1">
- <td class="td1">
- <span class="necessary">*</span>
- <?php
- if ($station_type == 'station') {//站点
- echo '站点名称:';
- } else {//区域
- echo '区域名称:';
- }
- ?>
- </td>
- <!--展示-->
- <td class="td2">
- <?php if ($opera == 'show') { ?>
- <span><?php echo $station_info['station_name']; ?></span>
- <!--添加-->
- <?php } else { ?>
- <input type="text" id="station_name"
- <?php if ($opera == 'update') {
- //修改
- echo 'value="' . $station_info['station_name'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <?php if ($station_type == 'station') { ?>
- <tr class="tr2">
- <td class="td1"><span class="necessary">*</span>坐标:</td>
- <td class="td2">
- <span class="longitude">经度:</span>
- <!--展示-->
- <?php if ($opera == 'show') {
- echo '<span class="show_x_y">' . $station_info['longitude'] . '</span>';
- } else { ?>
- <!--添加-->
- <input type="text" id="longitude"
- <?php if ($opera == 'update') {
- //修改
- echo 'value="' . $station_info['longitude'] . '"';
- } ?>
- >
- <?php } ?>
-
- <span class="latitude">纬度:</span>
- <!--展示-->
- <?php if ($opera == 'show') {
- echo '<span class="show_x_y">' . $station_info['latitude'] . '</span>';
- } else { ?>
- <!--添加-->
- <input type="text" id="latitude"
- <?php if ($opera == 'update') {
- //修改
- echo 'value="' . $station_info['latitude'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <tr class="tr3">
- <td class="td1"></td>
- <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>
- </td>
- </tr>
- <?php } ?>
- <tr class="tr4">
- <td class="td1"><span class="necessary">*</span>所属区域:</td>
- <td class="td2 range">
- <!--添加-->
- <?php if ($opera == 'add') { ?>
- <select id="range0" list_order='0' onchange="changeRange(this)">
- <option value="-1">请选择</option>
-
- <?php foreach ($range as $key => $vel) { ?>
- <option value="<?php echo $vel['area_id']; ?>">
- <?php echo $vel['area_name']; ?>
- </option>
- <?php } ?>
- </select>
- <!--修改-->
- <?php } elseif ($opera == 'update') { ?>
- <?php if (count($station_info['range_arr']) > 0) { ?>
- <select id="range0" list_order='0' onchange="changeRange(this)">
- <option value="-1">请选择</option>
-
- <?php foreach ($range as $range_key => $range_vel) { ?>
- <option
- value="<?php echo $range_vel['area_id']; ?>"
- <?php if ($range_vel['area_id'] == $station_info['range_arr'][0]) {
- echo 'selected="selected"';
- } ?>
- >
- <?php echo $range_vel['area_name']; ?>
- </option>
- <?php } ?>
- </select>
- <?php foreach ($station_info['range_arr'] as $key => $vel) { ?>
- <?php if (isset($station_info['rang_list_arr'][$vel])) { ?>
- <select id="range<?php echo $key + 1; ?>" list_order='<?php echo $key + 1; ?>'
- onchange="changeRange(this)">
- <option value="-1">请选择</option>
- <?php foreach ($station_info['rang_list_arr'][$vel] as $range_key => $range_vel) { ?>
- <option
- value="<?php echo $range_vel['area_id']; ?>"
- <?php if (isset($station_info['range_arr'][$key + 1])) { ?>
- <?php if ($range_vel['area_id'] == $station_info['range_arr'][$key + 1]) {
- echo 'selected="selected"';
- } ?>
- <?php } ?>
- >
- <?php echo $range_vel['area_name']; ?>
- </option>
- <?php } ?>
- </select>
- <?php } ?>
- <?php } ?>
- <?php } else { ?>
- <select id="range0" list_order='0' onchange="changeRange(this)">
- <option value="-1">请选择</option>
-
- <?php foreach ($range as $key => $vel) { ?>
- <option value="<?php echo $vel['area_id']; ?>">
- <?php echo $vel['area_name']; ?>
- </option>
- <?php } ?>
- </select>
- <?php } ?>
- <!--展示-->
- <?php } else {
- if (count($station_info['range_arr']) != 0) {
- foreach ($station_info['range_arr'] as $key => $vel) {
- echo '<span rang_id="' . $vel['area_id'] . '" class="show_range">' . $vel['area_name'] . '</span>';
- }
- }
- } ?>
- </td>
- </tr>
- <?php if ($station_type == 'station') { ?>
- <tr class="tr5">
- <td class="td1"><span class="necessary">*</span>地址:</td>
- <td class="td2">
- <!--展示-->
- <?php if ($opera == 'show') {
- echo '<span>' . $station_info['address'] . '</span>';
- } else { ?>
- <!--添加-->
- <input type="text" id="address"
- <?php if ($opera == 'update') {
- //修改
- echo 'value="' . $station_info['address'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <?php } ?>
- <tr class="tr6">
- <td class="td1">类型:</td>
- <td class="td2 poi_type">
- <!--添加-->
- <?php if ($opera == 'add') { ?>
- <?php foreach ($poi_type as $key => $vel) { ?>
- <label class="poi_type_one">
- <span><?php echo $vel['station_type_name']; ?></span>
- <input type="checkbox" class="poi_type_check" value="<?php echo $vel['station_type_id']; ?>">
- </label>
- <?php } ?>
- <!--修改-->
- <?php } elseif ($opera == 'update') { ?>
- <?php if (count($station_info['poi_type_arr']) > 0) { ?>
- <?php foreach ($station_info['poi_type_arr'] as $key => $vel) {
- $poi_type_arr[$vel] = $vel;
- } ?>
- <?php } else {
- $poi_type_arr = [];
- } ?>
- <?php foreach ($poi_type as $key => $vel) { ?>
- <label class="poi_type_one">
- <span><?php echo $vel['station_type_name']; ?></span>
- <input type="checkbox" class="poi_type_check"
- <?php if (isset($poi_type_arr[$vel['station_type_id']])) {
- echo 'checked = "checked"';
- } ?>
- value="<?php echo $vel['station_type_id']; ?>"
- >
- </label>
- <?php } ?>
- <!--展示-->
- <?php } else {
- if (count($station_info['poi_type_arr']) != 0) {
- foreach ($station_info['poi_type_arr'] as $key => $vel) {
- echo '<span station_type_id="' . $vel['station_type_id'] . '" class="show_poi_type">' . $vel['station_type_name'] . '</span>';
- }
- }
- } ?>
- </td>
- </tr>
-
- <?php if ($opera != 'add' && ($storage_type == 'audit' || $storage_type == 'reapply')) { ?>
- <tr class="tr7">
- <td class="td1"><span class="necessary">*</span>审核结果:</td>
- <td class="td2 ">
- <span><?php echo $station_info['check_status']; ?></span>
- </td>
- </tr>
- <?php } elseif ($opera == 'show' && $storage_type == 'check') { ?>
- <tr class="tr7">
- <td class="td1"><span class="necessary">*</span>审核结果:</td>
- <td class="td2 ">
- <select id="check_status">
- <option value="0">请选择</option>
- <option value="1">通过</option>
- <option value="2">不通过</option>
- </select>
- </td>
- </tr>
- <?php } ?>
-
- <?php if (($opera == 'add' && $storage_type == 'audit') || ($opera == 'update' && $storage_type == 'reapply')) { ?>
- <tr class="tr8">
- <td class="td1"><span class="necessary">*</span>申请理由:</td>
- <td class="td2 audit_text">
- <textarea id="audit_text" cols="40" rows="4"></textarea>
- </td>
- </tr>
- <?php } elseif ($opera == 'show' && $storage_type == 'check') { ?>
- <tr class="tr8">
- <td class="td1"><span class="necessary">*</span>审核说明:</td>
- <td class="td2 audit_text">
- <textarea id="audit_text" cols="40" rows="4"></textarea>
- </td>
- </tr>
- <?php } ?>
- <?php if (($opera != 'add' && $storage_type != 'formal') || ($opera == 'show' && $storage_type == 'check')) { ?>
- <tr class="tr9">
- <td class="td1">日志:</td>
- <td class="td2 audit_log">
- <span><?php echo $station_info['check_log']; ?></span>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
-
- <div class="opera_btn">
- <!-- 添加/修改-->
- <?php if ($opera != 'show' && $storage_type != 'reapply') { ?>
- <?php
- $btn_id = $opera . '_' . $station_type . '_' . $storage_type;
- $btn_onclick = $opera . '_' . $station_type . '_' . $storage_type;
- ?>
- <span class="btn-primary" id="<?php echo $btn_id; ?>"
- onclick="<?php echo $btn_onclick; ?>(<?php if ($opera == 'update') echo $station_info['station_id']; ?>)"
- <?php if ($opera == 'update') {
- echo 'station_id="' . $station_info['station_id'] . '"';
- } ?>
- >
- <?php if ($opera == 'add') {
- if ($storage_type == 'formal') {
- echo '保存';
- } else {//审核
- echo '提交审核';
- }
- } else {
- echo '确认';
- } ?>
- </span>
- <?php } elseif ($opera == 'show' && $storage_type == 'check') { ?>
- <?php if ($station_type == 'station') { ?>
- <span class="btn-primary" id="check_station"
- onclick="checkStation(<?php echo $station_info['station_id']; ?>)">审核站点</span>
- <?php } else { ?>
- <span class="btn-primary" id="check_range"
- onclick="checkRange(<?php echo $station_info['station_id']; ?>)">审核区域</span>
- <?php } ?>
- <?php } elseif ($opera == 'update' && $storage_type == 'reapply'){ ?>
- <?php if ($station_type == 'station') { ?>
- <span class="btn-primary" id="reapply_station"
- onclick="reapplyStation(<?php echo $station_info['station_id']; ?>)">重新申请</span>
- <?php } else { ?>
- <span class="btn-primary" id="reapply_range"
- onclick="reapplyRange(<?php echo $station_info['station_id']; ?>)">重新申请</span>
- <?php } ?>
- <?php }?>
- <span class="btn-primary" id="add_range" onclick="window.top.close();">
- <?php
- if ($opera != 'show') {
- echo '取消';
- } else {
- echo '关闭';
- }
- ?>
- </span>
- </div>
|