選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

407 行
16 KiB

  1. <?php
  2. /**
  3. *
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 张帅
  12. * PhpStorm driver_info.php
  13. * Create By 2016/12/29 10:09 $
  14. */
  15. use backend\modules\zzcs\assets\ZzcsAsset;
  16. use yii\helpers\Html;
  17. ZzcsAsset::addCss($this, '/driver/css/driver_info.css');
  18. ZzcsAsset::addCss($this, '/global/css/combo.select.css');
  19. ZzcsAsset::addCss($this, '/plug/My97DatePicker/skin/WdatePicker.css');
  20. ZzcsAsset::addScript($this, '/global/js/jquery.combo.select.js');
  21. ZzcsAsset::addScript($this, '/driver/js/driver_info.js');
  22. ZzcsAsset::addScript($this, '/plug/My97DatePicker/WdatePicker.js');
  23. ZzcsAsset::addScript($this, '/plug/layer/layer.js');
  24. ?>
  25. <div class="title_add"><?= Html::encode($this->title) ?></div>
  26. <div class="line_top"></div>
  27. <div class="content_header">基本信息</div>
  28. <table class="table_info">
  29. <tbody>
  30. <tr class="tr1">
  31. <td class="td1">
  32. <span class="necessary">*</span>
  33. 姓名:
  34. </td>
  35. <td class="td2">
  36. <!-- 展示-->
  37. <?php if ($opera == 'show') { ?>
  38. <span class="show_span"><?php echo $driver_info['driver_name']; ?></span>
  39. <?php } else { ?>
  40. <!-- 添加-->
  41. <input type="text" id="driver_name"
  42. <?php if ($opera == 'update') {
  43. //修改
  44. echo 'value="' . $driver_info['driver_name'] . '"';
  45. } ?>
  46. >
  47. <?php } ?>
  48. </td>
  49. </tr>
  50. <tr class="tr2">
  51. <td class="td1">
  52. <span class="necessary">*</span>
  53. 所属车队:
  54. </td>
  55. <td class="td2">
  56. <!-- 展示-->
  57. <?php if ($opera == 'show') { ?>
  58. <span class="show_span"><?php echo $driver_info['supplier_name']; ?></span>
  59. <?php } else { ?>
  60. <select class="select_line motorcade">
  61. <option value="-1">请选择</option>
  62. <!-- 添加-->
  63. <?php if ($opera == 'add') { ?>
  64. <?php foreach ($motorcade_list as $key => $vel) { ?>
  65. <option
  66. value="<?php echo $vel['supplier_id']; ?>"><?php echo $vel['supplier_name']; ?></option>
  67. <?php } ?>
  68. <?php } else { ?>
  69. <!-- 修改-->
  70. <?php foreach ($motorcade_list as $key => $vel) { ?>
  71. <option
  72. value="<?php echo $vel['supplier_id']; ?>"
  73. <?php if ($driver_info['supplier_id'] == $vel['supplier_id']) {
  74. echo 'selected="selected"';
  75. } ?>
  76. ><?php echo $vel['supplier_name']; ?></option>
  77. <?php } ?>
  78. <?php } ?>
  79. </select>
  80. <?php } ?>
  81. </td>
  82. </tr>
  83. <tr class="tr3">
  84. <td class="td1">
  85. <span class="necessary">*</span>
  86. 状态:
  87. </td>
  88. <td class="td2">
  89. <!-- 展示-->
  90. <?php if ($opera == 'show') { ?>
  91. <span class="show_span"><?php echo $driver_info['driver_status']; ?></span>
  92. <?php } else { ?>
  93. <select class="driver_status">
  94. <option value="-1">请选择</option>
  95. <!-- 添加-->
  96. <?php if ($opera == 'add') { ?>
  97. <?php foreach ($driver_status as $key => $value) { ?>
  98. <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
  99. <?php } ?>
  100. <?php } else { ?>
  101. <!-- 修改-->
  102. <?php foreach ($driver_status as $key => $value) { ?>
  103. <option value="<?php echo $key; ?>"
  104. <?php if ($driver_info['driver_status'] == $key) {
  105. echo 'selected="selected"';
  106. } ?>
  107. ><?php echo $value; ?></option>
  108. <?php } ?>
  109. <?php } ?>
  110. </select>
  111. <?php } ?>
  112. </td>
  113. </tr>
  114. <tr class="tr4">
  115. <td class="td1">
  116. 工号:
  117. </td>
  118. <td class="td2">
  119. <!-- 展示-->
  120. <?php if ($opera == 'show') { ?>
  121. <span class="show_span"><?php echo $driver_info['driver_number']; ?></span>
  122. <?php } else { ?>
  123. <!-- 添加-->
  124. <input type="text" id="driver_code"
  125. <?php if ($opera == 'update') {
  126. //修改
  127. echo ' value="' . $driver_info['driver_number'] . '"';
  128. } ?>
  129. >
  130. <?php } ?>
  131. </td>
  132. </tr>
  133. <tr class="tr5">
  134. <td class="td1">
  135. <span class="necessary">*</span>
  136. 驾驶证号:
  137. </td>
  138. <td class="td2">
  139. <!-- 展示-->
  140. <?php if ($opera == 'show') { ?>
  141. <span class="show_span"><?php echo $driver_info['license_no']; ?></span>
  142. <?php } else { ?>
  143. <!-- 添加-->
  144. <input type="text" id="driver_license"
  145. <?php if ($opera == 'update') {
  146. //修改
  147. echo 'value="' . $driver_info['license_no'] . '"';
  148. } ?>
  149. >
  150. <?php } ?>
  151. </td>
  152. </tr>
  153. <tr class="tr6">
  154. <td class="td1">
  155. <span class="necessary">*</span>
  156. 手机号:
  157. </td>
  158. <td class="td2">
  159. <!-- 展示-->
  160. <?php if ($opera == 'show') { ?>
  161. <span class="show_span"><?php echo $driver_info['phone_no']; ?></span>
  162. <?php } else { ?>
  163. <!-- 添加-->
  164. <input type="text" id="driver_mobile"
  165. <?php if ($opera == 'update') {
  166. //修改
  167. echo ' value="' . $driver_info['phone_no'] . '"';
  168. } ?>
  169. >
  170. <?php } ?>
  171. </td>
  172. </tr>
  173. <tr class="tr7">
  174. <td class="td1">
  175. <span class="necessary">*</span>
  176. 性别:
  177. </td>
  178. <td class="td2">
  179. <!-- 展示-->
  180. <?php if ($opera == 'show') { ?>
  181. <span class="show_span"><?php echo $driver_info['sex']; ?></span>
  182. <?php } else { ?>
  183. <select id="driver_sex" name="driver_sex">
  184. <option value="-1">请选择</option>
  185. <!-- 添加-->
  186. <?php if ($opera == 'add') { ?>
  187. <?php foreach ($sex_array as $key => $value) { ?>
  188. <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
  189. <?php } ?>
  190. <?php } else { ?>
  191. <!-- 修改-->
  192. <?php foreach ($sex_array as $key => $value) { ?>
  193. <option value="<?php echo $key; ?>"
  194. <?php if ($driver_info['sex'] == $key) {
  195. echo 'selected="selected"';
  196. } ?>
  197. ><?php echo $value; ?></option>
  198. <?php } ?>
  199. <?php } ?>
  200. </select>
  201. <?php } ?>
  202. </td>
  203. </tr>
  204. <tr class="tr8">
  205. <td class="td1">
  206. 出生日期:
  207. </td>
  208. <td class="td2">
  209. <!-- 展示-->
  210. <?php if ($opera == 'show') { ?>
  211. <span class="show_span"><?php echo $driver_info['driver_birthday']; ?></span>
  212. <?php } else { ?>
  213. <!-- 添加-->
  214. <input type="text" id="driver_birthday" onclick="WdatePicker()"
  215. <?php if ($opera == 'update') {
  216. //修改
  217. echo ' value="' . $driver_info['driver_birthday'] . '"';
  218. } ?>
  219. />
  220. <?php } ?>
  221. </td>
  222. </tr>
  223. <tr class="tr9">
  224. <td class="td1">
  225. 初次领证日期:
  226. </td>
  227. <td class="td2">
  228. <!-- 展示-->
  229. <?php if ($opera == 'show') { ?>
  230. <span class="show_span"><?php echo $driver_info['first_license_date']; ?></span>
  231. <?php } else { ?>
  232. <!-- 添加-->
  233. <input type="text" id="first_license_date" onclick="WdatePicker()"
  234. <?php if ($opera == 'update') {
  235. //修改
  236. echo ' value="' . $driver_info['first_license_date'] . '"';
  237. } ?>
  238. />
  239. <?php } ?>
  240. </td>
  241. </tr>
  242. <tr class="tr10">
  243. <td class="td1">
  244. 居住地址:
  245. </td>
  246. <td class="td2 range">
  247. <!-- 添加-->
  248. <?php if ($opera == 'add') { ?>
  249. <select id="range0" list_order='0' onchange="changeRange(this)">
  250. <option value="-1">请选择</option>
  251. <?php foreach ($range as $key => $vel) { ?>
  252. <option value="<?php echo $vel['area_id']; ?>">
  253. <?php echo $vel['area_name']; ?>
  254. </option>
  255. <?php } ?>
  256. </select>
  257. <!--修改-->
  258. <?php } elseif ($opera == 'update') { ?>
  259. <?php if (count($driver_info['range_arr']) > 0) { ?>
  260. <select id="range0" list_order='0' onchange="changeRange(this)">
  261. <option value="-1">请选择</option>
  262. <?php foreach ($range as $range_key => $range_vel) { ?>
  263. <option
  264. value="<?php echo $range_vel['area_id']; ?>"
  265. <?php if ($range_vel['area_id'] == $driver_info['range_arr'][0]) {
  266. echo 'selected="selected"';
  267. } ?>
  268. >
  269. <?php echo $range_vel['area_name']; ?>
  270. </option>
  271. <?php } ?>
  272. </select>
  273. <?php foreach ($driver_info['range_arr'] as $key => $vel) { ?>
  274. <?php if (isset($driver_info['rang_list_arr'][$vel])) { ?>
  275. <select id="range<?php echo $key + 1; ?>" list_order='<?php echo $key + 1; ?>'
  276. onchange="changeRange(this)">
  277. <option value="-1">请选择</option>
  278. <?php foreach ($driver_info['rang_list_arr'][$vel] as $range_key => $range_vel) { ?>
  279. <option
  280. value="<?php echo $range_vel['area_id']; ?>"
  281. <?php if (isset($driver_info['range_arr'][$key + 1])) { ?>
  282. <?php if ($range_vel['area_id'] == $driver_info['range_arr'][$key + 1]) {
  283. echo 'selected="selected"';
  284. } ?>
  285. <?php } ?>
  286. >
  287. <?php echo $range_vel['area_name']; ?>
  288. </option>
  289. <?php } ?>
  290. </select>
  291. <?php } ?>
  292. <?php } ?>
  293. <?php } else { ?>
  294. <select id="range0" list_order='0' onchange="changeRange(this)">
  295. <option value="-1">请选择</option>
  296. <?php foreach ($range as $key => $vel) { ?>
  297. <option value="<?php echo $vel['area_id']; ?>">
  298. <?php echo $vel['area_name']; ?>
  299. </option>
  300. <?php } ?>
  301. </select>
  302. <?php } ?>
  303. <!--展示-->
  304. <?php } else {
  305. if (count($driver_info['range_arr']) != 0) {
  306. foreach ($driver_info['range_arr'] as $key => $vel) {
  307. echo '<span rang_id="' . $vel['area_id'] . '" class="show_span">' . $vel['area_name'] . '</span>';
  308. }
  309. }
  310. } ?>
  311. <!-- 展示-->
  312. <?php if ($opera == 'show') { ?>
  313. <span class="show_span"><?php echo $driver_info['address']; ?></span>
  314. <?php } else { ?>
  315. <!-- 添加-->
  316. <input type="text" id="driver_address"
  317. <?php if ($opera == 'update') {
  318. //修改
  319. echo ' value="' . $driver_info['address'] . '"';
  320. } ?>
  321. />
  322. <?php } ?>
  323. </td>
  324. </tr>
  325. <tr class="tr11">
  326. <td class="td1">
  327. 有效起止日期:
  328. </td>
  329. <td class="td2">
  330. <!-- 展示-->
  331. <?php if ($opera == 'show') { ?>
  332. <span class="show_span"><?php echo $driver_info['license_start_date']; ?></span>
  333. <?php } else { ?>
  334. <!-- 添加-->
  335. <input type="text" id="license_start_date" onclick="WdatePicker()"
  336. <?php if ($opera == 'update') {
  337. //修改
  338. echo ' value="' . $driver_info['license_start_date'] . '"';
  339. } ?>
  340. >
  341. <?php } ?>
  342. </td>
  343. </tr>
  344. <tr class="tr12">
  345. <td class="td1">
  346. 有效期限:
  347. </td>
  348. <td class="td2">
  349. <!-- 展示-->
  350. <?php if ($opera == 'show') { ?>
  351. <span class="show_span"><?php echo $driver_info['valid_years']; ?></span>
  352. <?php } else { ?>
  353. <select id="active_year_array" name="driver_sex">
  354. <option value="0">请选择</option>
  355. <?php if ($opera == 'add') { ?>
  356. <!-- 添加-->
  357. <?php foreach ($active_year_array as $key => $value) { ?>
  358. <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
  359. <?php } ?>
  360. <?php } else { ?>
  361. <!-- 修改 -->
  362. <?php foreach ($active_year_array as $key => $value) { ?>
  363. <option value="<?php echo $key; ?>"
  364. <?php if ($driver_info['valid_years'] == $key) {
  365. echo ' selected="selected"';
  366. } ?>
  367. ><?php echo $value; ?></option>
  368. <?php } ?>
  369. <?php } ?>
  370. </select>
  371. <?php } ?>
  372. </td>
  373. </tr>
  374. </tbody>
  375. </table>
  376. <div class="opera_btn">
  377. <!-- 添加/修改-->
  378. <?php if ($opera == 'add') { ?>
  379. <span class="btn-primary" id="add_driver" onclick="driverAdd()">确定
  380. </span>
  381. <?php } elseif ($opera == 'update') { ?>
  382. <span class="btn-primary" id="update_driver"
  383. onclick="driverUpdate(<?php echo $driver_info['driver_id']; ?>)"
  384. >确定
  385. </span>
  386. <?php } ?>
  387. <span class="btn-primary" id="add_range" onclick="window.top.close();">
  388. <?php
  389. if ($opera != 'show') {
  390. echo '取消';
  391. } else {
  392. echo '关闭';
  393. }
  394. ?>
  395. </span>
  396. </div>