| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>编辑驾驶员信息</title>
- <script src="/shares/js/jquery-1.6.4.min.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/file.js"></script>
- <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
- <script src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript" ></script>
- <link href="./liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css"></link>
- <script src="./liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="./liger/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript">
- //焦点
- $(document).ready(function() {
- $("input[type='text']:first").focus();
- });
- $(function (){
- var id = "${driver.driver_type }";
- var name = "${requestScope.driver_types }";
- $("#sex").ligerComboBox();
- $("#driver_type").ligerComboBox({
- selectBoxHeight: 200,
- initText:''+name+'',
- initValue:''+id+'',
- url :'carDictionaryAction.do?task=toDictionaryListTypes',
- isShowCheckBox: true,
- isMultiSelect: true,
- textField : 'dictionary_name',
- valueField : 'universalid',
- valueFieldID: 'driver_type_id',
- split :','
- });
- });
-
- function checkForm(){
- var rs = $.validate({
- name : "driver_name",
- model : [ {type : "require",msg : "驾驶员姓名不能为空!"},
- {type : "len",min : 1,max : 50,msg : "驾驶员姓名长度不能超过50个字符!"} ]});
- rs = $.validate({
- name : "identity_card_number",
- model : [{type : "len",min : 0,max : 50,msg : "身份证号码长度不能超过50个字符!"}]}) && rs;
- rs = $.validate({
- name : "driver_number",
- model : [{type : "len",min : 0,max : 50,msg : "驾驶证号长度不能超过50个字符!"}]}) && rs;
- rs = $.validate({
- name : "remark",
- model : [ {type : "len",min : 0,max : 255,msg : "备注长度不能超过255个字符!"}]}) && rs;
- /* rs = $.validate({
- name : "sex",
- model : [ {type : "require",msg : "驾驶员性别不能为空!"} ]}) && rs;
- rs = $.validate({
- name : "identity_card_number",
- model : [ {type : "require",msg : "身份证号码不能为空!"},
- {type : "len",min : 1,max : 50,msg : "身份证号码长度不能超过50个字符!"}
- // { type : "regex",
- //regex: new RegExp("^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$"),
- //msg : "身份证格式输入错误"
- //}
- ]}) && rs;
- rs = $.validate({
- name : "driver_type",
- model : [ {type : "require",msg : "准驾类型不能为空!"}]}) && rs;
- //,msgBox:"driver_type_empty"}
- rs = $.validate({
- name : "driver_number",
- model : [ {type : "require",msg : "驾驶证号不能为空!"},
- {type : "len",min : 1,max : 50,msg : "驾驶证号长度不能超过50个字符!"}
- // { type : "regex",
- //regex: new RegExp("^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$"),
- //msg : "驾驶证号格式输入错误"
- //}
- ]}) && rs;
- rs = $.validate({
- name : "issuing_authority",
- model : [ {type : "require",msg : "发证机关不能为空!"},
- {type : "len",min : 1,max : 50,msg : "发证机关长度不能超过50个字符!"}]}) && rs;
- rs = $.validate({
- name : "get_Date",
- model : [ {type : "require",msg : "领证日期不能为空!"}]}) && rs;
- rs = $.validate({
- name : "begin_date",
- model : [ {type : "require",msg : "有效开始时间不为空!",msgBox:"begin_date_prompt"}]}) && rs;
- rs = $.validate({
- name : "end_date",
- model : [ {type : "require",msg : "有效结束时间不为空!",msgBox:"end_date_prompt"}]}) && rs;
- rs = $.validate({
- name : "practitioners_number",
- model : [ {type : "len",min : 0,max : 50,msg : "从业资格证号长度不能超过50个字符!"}]}) && rs;
- rs = $.validate({
- name : "remark",
- model : [ {type : "len",min : 0,max : 255,msg : "备注长度不能超过255个字符!"}]}) && rs; */
- if (rs) {
- /* var begin_date = $("#begin_date").val();
- var end_date = $("#end_date").val();
- var begin_dates = begin_date.split("-");
- var starttime = (new Date(begin_dates[0], begin_dates[1], begin_dates[2])).getTime();
- var end_dates = end_date.split("-");
- var endtime = (new Date(end_dates[0], end_dates[1], end_dates[2])).getTime();
- if (starttime >= endtime) {
- $.ligerDialog.alert('有效期结束时间不能小于开始时间!', '提示', 'warn');
- return false;
- } */
- return true;
- }else{
- return false;
- }
- }
- $(function() {
- loadTypeTree("selectbutton1", {type : "singleuser",backId : "dev_buy_person",backName : "dev_buy_person_name",tab : 1});
- loadTypeTree("selectbutton2", {type : "detpusersingle",backId : "dev_useman",backName : "dev_useman_name",tab : 1});
- $("#get_Date").ligerDateEditor({labelAlign : 'left'});
- $("#begin_date").ligerDateEditor({labelAlign : 'left'});
- $("#end_date").ligerDateEditor({labelAlign : 'left'});
- });
- //选择准驾类型
- function chooseDriverType(o){
- var driver_Type = ${requestScope.driver_Type};
- o = $.extend({
- driver_type_id : "driver_type_id",
- driver_type : "driver_type",
- checkbox : true
- }, o);
- $.ligerDialog.open({
- url : 'carDictionaryAction.do?task=toList2&driver_type='+driver_Type+'&lookup=lookup&checkbox='+o.checkbox,
- height : 340,
- width : 800,
- title : "准驾类型",
- buttons : [{text : '确定',
- onclick : function(item, dialog) {
- var rows = dialog.frame.f_select();
- if(rows.length == 0){
- $.ligerDialog.alert('请选择一个信息!', '提示', 'warn');
- return;
- }
- var universalids = "", dictionary_names = "";
- if (rows) {
- for ( var i = 0; i < rows.length; i++) {
- universalids += ("," + rows[i].universalid);
- dictionary_names += ("," + rows[i].dictionary_name);
- }
- universalid = universalids.substring(1, universalids.length);
- dictionary_name = dictionary_names.substring(1, dictionary_names.length);
- }
- if ($("#" + o.driver_type_id).length > 0){
- $("#" + o.driver_type_id).val(universalid);
- }
- if ($("#" + o.driver_type).length > 0){
- $("#" + o.driver_type).val(dictionary_name);
- }
- dialog.close();
- $(".l-dialog-win").remove();
- }
- }, {
- text : '取消',
- onclick : function(item, dialog) {
- dialog.close();
- $(".l-dialog-win").remove();
- }
- } ],
- name : "listDialog"
- });
- }
- function refresh(obj){
- if(obj == "1"){
- parent.location.reload();
- }
- }
- </script>
- <style type="text/css">
- .file-style{
- width: 550px;
- }
- .file-style input[type='file'] {
- width:385px ;
- height:24px;
- line-height:22px;
- vertical-align: bottom;
- background-color: #fff;
- border: 1px solid #cccccc;
- margin-top: 2px;
- margin-bottom: 2px;
- }
- </style>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <form action="carDriverAction.do" method="post" onsubmit="return checkForm()">
- <div id="title" class="form-button">
- <input type="submit" class="l-button" value="确定" />
- <input type="button" value="关闭" class="l-button" onclick="closeWindow();" />
- </div>
- <div class="container-layout">
- <div class="forum-container">
-
- <center>
- <table class="l-table-edit line">
- <tr>
- <th colspan="4">
- 驾驶员信息
- </th>
- </tr>
- <tr>
- <td class="l-table-edit-text">驾驶员姓名<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="driver_name" name="driver_name" value="${driver.driver_name }" >
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">性别:</td>
- <td class="l-table-edit-td" colspan="3">
- <select id="sex" name="sex" style="width: 60px;">
- <option value="${dictionary2.universalid }">${dictionary2.dictionary_name }</option>
- <c:forEach items="${dictionaries}" var="inforpubdict">
- <c:if test="${dictionary2.universalid != inforpubdict.universalid}">
- <option value="${inforpubdict.universalid}" >${inforpubdict.dictionary_name}</option>
- </c:if>
- </c:forEach>
- </select>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">驾驶证号:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="driver_number" name="driver_number" value="${driver.driver_number }">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">证件到期时间:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="end_date" name="end_date" value="${driver.end_date }" readonly="readonly">
- <label id="end_date_prompt"></label>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">准驾类型:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="driver_type" name="driver_type" value="${requestScope.driver_types }"/>
- <input type="hidden" id="driver_type_id" name="driver_type_id" value="${driver.driver_type }"/>
- <!-- <input type="button" class="l-button" value="选择"
- onclick="chooseDriverType({driver_type_id:'driver_type_id',driver_type:'driver_type'});" /> -->
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">身份证号码:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="identity_card_number" name="identity_card_number" value="${driver.identity_card_number }">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">备注:</td>
- <td class="l-table-edit-td" colspan="3">
- <div style="float: left;">
- <textarea id="remark" name="remark" rows="3" cols="50">${driver.remark }</textarea>
- </div>
- </td>
- </tr>
- </table>
- <input type="hidden" id="universalid" name="universalid" value="${driver.universalid }">
- <input type="hidden" id="task" name="task" value="doEditDriver">
- <input type="hidden" id="tabid" name="tabid" value="${requestScope.tabid}">
- </center>
- </div>
- </div>
- </form>
- </body>
- </html>
|