|
- <?php
- /**
- *
- * ============================================================================
- * * 版权所有 蜘蛛出行 * *
- * 网站地址: http://www.zhizhuchuxing.com
- * ----------------------------------------------------------------------------
- * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
- * 使用;不允许对程序代码以任何形式任何目的的再发布。
- * ============================================================================
- * Author By: 张帅
- * PhpStorm driver_info.php
- * Create By 2016/12/29 10:09 $
- */
-
- use backend\modules\zzcs\assets\ZzcsAsset;
- use yii\helpers\Html;
-
- ZzcsAsset::addCss($this, '/driver/css/driver_info.css');
- ZzcsAsset::addCss($this, '/global/css/combo.select.css');
- ZzcsAsset::addCss($this, '/plug/My97DatePicker/skin/WdatePicker.css');
- ZzcsAsset::addScript($this, '/global/js/jquery.combo.select.js');
- ZzcsAsset::addScript($this, '/driver/js/driver_info.js');
- ZzcsAsset::addScript($this, '/plug/My97DatePicker/WdatePicker.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>
- 姓名:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['driver_name']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="driver_name"
- <?php if ($opera == 'update') {
- //修改
- echo 'value="' . $driver_info['driver_name'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <tr class="tr2">
- <td class="td1">
- <span class="necessary">*</span>
- 所属车队:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['supplier_name']; ?></span>
- <?php } else { ?>
- <select class="select_line motorcade">
- <option value="-1">请选择</option>
- <!-- 添加-->
- <?php if ($opera == 'add') { ?>
- <?php foreach ($motorcade_list as $key => $vel) { ?>
- <option
- value="<?php echo $vel['supplier_id']; ?>"><?php echo $vel['supplier_name']; ?></option>
- <?php } ?>
- <?php } else { ?>
- <!-- 修改-->
- <?php foreach ($motorcade_list as $key => $vel) { ?>
- <option
- value="<?php echo $vel['supplier_id']; ?>"
- <?php if ($driver_info['supplier_id'] == $vel['supplier_id']) {
- echo 'selected="selected"';
- } ?>
- ><?php echo $vel['supplier_name']; ?></option>
- <?php } ?>
- <?php } ?>
- </select>
- <?php } ?>
- </td>
- </tr>
- <tr class="tr3">
- <td class="td1">
- <span class="necessary">*</span>
- 状态:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['driver_status']; ?></span>
- <?php } else { ?>
- <select class="driver_status">
- <option value="-1">请选择</option>
- <!-- 添加-->
- <?php if ($opera == 'add') { ?>
- <?php foreach ($driver_status as $key => $value) { ?>
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
- <?php } ?>
- <?php } else { ?>
- <!-- 修改-->
- <?php foreach ($driver_status as $key => $value) { ?>
- <option value="<?php echo $key; ?>"
- <?php if ($driver_info['driver_status'] == $key) {
- echo 'selected="selected"';
- } ?>
- ><?php echo $value; ?></option>
- <?php } ?>
- <?php } ?>
- </select>
- <?php } ?>
- </td>
- </tr>
- <tr class="tr4">
- <td class="td1">
- 工号:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['driver_number']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="driver_code"
- <?php if ($opera == 'update') {
- //修改
- echo ' value="' . $driver_info['driver_number'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <tr class="tr5">
- <td class="td1">
- <span class="necessary">*</span>
- 驾驶证号:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['license_no']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="driver_license"
- <?php if ($opera == 'update') {
- //修改
- echo 'value="' . $driver_info['license_no'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <tr class="tr6">
- <td class="td1">
- <span class="necessary">*</span>
- 手机号:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['phone_no']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="driver_mobile"
- <?php if ($opera == 'update') {
- //修改
- echo ' value="' . $driver_info['phone_no'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <tr class="tr7">
- <td class="td1">
- <span class="necessary">*</span>
- 性别:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['sex']; ?></span>
- <?php } else { ?>
- <select id="driver_sex" name="driver_sex">
- <option value="-1">请选择</option>
- <!-- 添加-->
- <?php if ($opera == 'add') { ?>
- <?php foreach ($sex_array as $key => $value) { ?>
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
- <?php } ?>
- <?php } else { ?>
- <!-- 修改-->
- <?php foreach ($sex_array as $key => $value) { ?>
- <option value="<?php echo $key; ?>"
- <?php if ($driver_info['sex'] == $key) {
- echo 'selected="selected"';
- } ?>
- ><?php echo $value; ?></option>
- <?php } ?>
- <?php } ?>
- </select>
- <?php } ?>
- </td>
- </tr>
- <tr class="tr8">
- <td class="td1">
- 出生日期:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['driver_birthday']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="driver_birthday" onclick="WdatePicker()"
- <?php if ($opera == 'update') {
- //修改
- echo ' value="' . $driver_info['driver_birthday'] . '"';
- } ?>
- />
- <?php } ?>
- </td>
- </tr>
- <tr class="tr9">
- <td class="td1">
- 初次领证日期:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['first_license_date']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="first_license_date" onclick="WdatePicker()"
- <?php if ($opera == 'update') {
- //修改
- echo ' value="' . $driver_info['first_license_date'] . '"';
- } ?>
- />
- <?php } ?>
- </td>
- </tr>
- <tr class="tr10">
- <td class="td1">
- 居住地址:
- </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($driver_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'] == $driver_info['range_arr'][0]) {
- echo 'selected="selected"';
- } ?>
- >
- <?php echo $range_vel['area_name']; ?>
- </option>
- <?php } ?>
- </select>
- <?php foreach ($driver_info['range_arr'] as $key => $vel) { ?>
- <?php if (isset($driver_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 ($driver_info['rang_list_arr'][$vel] as $range_key => $range_vel) { ?>
- <option
- value="<?php echo $range_vel['area_id']; ?>"
- <?php if (isset($driver_info['range_arr'][$key + 1])) { ?>
- <?php if ($range_vel['area_id'] == $driver_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($driver_info['range_arr']) != 0) {
- foreach ($driver_info['range_arr'] as $key => $vel) {
- echo '<span rang_id="' . $vel['area_id'] . '" class="show_span">' . $vel['area_name'] . '</span>';
- }
- }
- } ?>
-
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['address']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="driver_address"
- <?php if ($opera == 'update') {
- //修改
- echo ' value="' . $driver_info['address'] . '"';
- } ?>
- />
- <?php } ?>
- </td>
- </tr>
- <tr class="tr11">
- <td class="td1">
- 有效起止日期:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['license_start_date']; ?></span>
- <?php } else { ?>
- <!-- 添加-->
- <input type="text" id="license_start_date" onclick="WdatePicker()"
- <?php if ($opera == 'update') {
- //修改
- echo ' value="' . $driver_info['license_start_date'] . '"';
- } ?>
- >
- <?php } ?>
- </td>
- </tr>
- <tr class="tr12">
- <td class="td1">
- 有效期限:
- </td>
- <td class="td2">
- <!-- 展示-->
- <?php if ($opera == 'show') { ?>
- <span class="show_span"><?php echo $driver_info['valid_years']; ?></span>
- <?php } else { ?>
- <select id="active_year_array" name="driver_sex">
- <option value="0">请选择</option>
- <?php if ($opera == 'add') { ?>
- <!-- 添加-->
- <?php foreach ($active_year_array as $key => $value) { ?>
- <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
- <?php } ?>
- <?php } else { ?>
- <!-- 修改 -->
- <?php foreach ($active_year_array as $key => $value) { ?>
- <option value="<?php echo $key; ?>"
- <?php if ($driver_info['valid_years'] == $key) {
- echo ' selected="selected"';
- } ?>
- ><?php echo $value; ?></option>
- <?php } ?>
- <?php } ?>
- </select>
- <?php } ?>
- </td>
- </tr>
- </tbody>
- </table>
-
- <div class="opera_btn">
- <!-- 添加/修改-->
- <?php if ($opera == 'add') { ?>
- <span class="btn-primary" id="add_driver" onclick="driverAdd()">确定
- </span>
- <?php } elseif ($opera == 'update') { ?>
- <span class="btn-primary" id="update_driver"
- onclick="driverUpdate(<?php echo $driver_info['driver_id']; ?>)"
- >确定
- </span>
- <?php } ?>
-
- <span class="btn-primary" id="add_range" onclick="window.top.close();">
- <?php
- if ($opera != 'show') {
- echo '取消';
- } else {
- echo '关闭';
- }
- ?>
- </span>
- </div>
-
|