| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488 |
- <%@ 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>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.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 src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/json2.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
- <script type="text/javascript">
-
- function checkForm(){
- var rs = $.validate({
- name : "application",
- model : [ {
- type : "require",
- msg : "申请单号不能为空!"
- },{type : "len",min : 0,max : 30,msg : "申请单号长度不能超过30个字符!"}]
- });
- rs = $.validate({
- name : "plate_number",
- model : [ {
- type : "require",
- msg : "车牌号不能为空!"
- }]
- }) && rs;
- if (rs) {
- $("#requestForm").submit();
- }else{
- return false;
- }
- }
- /**
- * 选择车牌号函数
- */
- var car_ky = "${requestScope.CAR_KY}";
- var car_cc= "${requestScope.CAR_CC}";
- var car_wx = "${requestScope.CAR_WX}";
- var car_qt = "${requestScope.CAR_QT}";
- function chooseCustomer(o) {
- o = $.extend({
- plate_number_id : "plate_number_id",
- plate_number : "plate_number",
- out_car_mileage : "out_car_mileage",
- motorcade : "motorcade",
- checkbox : true
- }, o);
- $.ligerDialog.open({
- url : 'carMotorcadeCarAction.do?task=carList2&car_state='+car_ky+'-'+car_qt+'&state=1&lookup=lookup&checkbox='+o.checkbox,
- height : 350,
- width : 800,
- title : "车辆信息",
- buttons : [
- {
- text : '确定',
- onclick : function(item, dialog) {
- var rows = dialog.frame.f_select();
- if(rows.length == 0){
- $.ligerDialog.alert('请选择一个车辆信息!', '提示', 'warn');
- return;
- }
- if(rows.length > 1){
- $.ligerDialog.alert('只能选择一个车辆信息!', '提示', 'warn');
- return;
- }
- var universalids = "", plate_numbers = "" ,initial_ranges = "" ,motorcades = "";
- if (rows) {
- for ( var i = 0; i < rows.length; i++) {
- universalids += ("," + rows[i].universalid);
- plate_numbers += ("," + rows[i].plate_number);
- initial_ranges += ("," + rows[i].initial_range);
- motorcades += ("," + rows[i].motorcade_name);
- }
- universalid = universalids.substring(1, universalids.length);
- plate_number = plate_numbers.substring(1, plate_numbers.length);
- initial_range = initial_ranges.substring(1, initial_ranges.length);
- motorcade = motorcades.substring(1, motorcades.length);
- }
- if ($("#" + o.plate_number_id).length > 0){
- $("#" + o.plate_number_id).val(universalid);
- }
- if ($("#" + o.plate_number).length > 0){
- $("#" + o.plate_number).val(plate_number);
- }
- if ($("#" + o.out_car_mileage).length > 0){
- $("#" + o.out_car_mileage).val(initial_range);
- }
- if ($("#" + o.motorcade).length > 0){
- $("#" + o.motorcade).val(motorcade);
- }
- //加一个获取联系列表的方法,实现客户和联系人的联动效果
- //if('' != o.inputid && 'undefined' != o.inputid){
- //getContacterList(ids, o);
- //}
- dialog.close();
- $(".l-dialog-win").remove();
- }
- }, {
- text : '取消',
- onclick : function(item, dialog) {
- dialog.close();
- $(".l-dialog-win").remove();
- }
- } ],
- name : "listDialog"
- });
- }
- //申请单号
- function chooseApplication(o) {
- o = $.extend({
- universalid : "universalid",
- application : "application",
- car_department : "car_department",
- car_people : "car_people",
- destination : "destination",
- out_car_time : "out_car_time",
- out_car_reason : "out_car_reason",
- predict_return_time : "predict_return_time",
- entourage : "entourage",
- remark :"remark",
- checkbox : true
- }, o);
- $.ligerDialog.open({
- url : 'carReturnCarAction.do?task=toReturnCarListOk2&lookup=lookup&checkbox='+o.checkbox,
- height : 350,
- width : 800,
- title : "审核通过的用车申请",
- buttons : [{text : '确定',
- onclick : function(item, dialog) {
- var rows = dialog.frame.f_select();
- if(rows.length == 0){
- $.ligerDialog.alert('请选择一个用车信息!', '提示', 'warn');
- return;
- }
- if(rows.length > 1){
- $.ligerDialog.alert('只能选择一个用车信息!', '提示', 'warn');
- return;
- }
- var universalids="",applications="",car_departments ="",car_peoples ="",destinations ="",out_car_times ="",out_car_reasons ="",predict_return_times="",entourages="",remarks="";
- if (rows) {
- for ( var i = 0; i < rows.length; i++) {
- universalids += ("," + rows[i].universalid);
- applications += ("," + rows[i].application);
- car_departments += ("," + rows[i].car_department_name);
- car_peoples += ("," + rows[i].car_people_name);
- destinations += ("," + rows[i].destination);
- out_car_times += ("," + rows[i].out_car_time);
- out_car_reasons += ("," + rows[i].out_car_reason);
- predict_return_times += ("," + rows[i].predict_return_time);
- entourages += ("," + rows[i].entourage);
- remarks += ("," + rows[i].remark);
- }
- universalid = universalids.substring(1, universalids.length);
- application = applications.substring(1, applications.length);
- car_department = car_departments.substring(1, car_departments.length);
- car_people = car_peoples.substring(1, car_peoples.length);
- destination = destinations.substring(1, destinations.length);
- out_car_time = out_car_times.substring(1, out_car_times.length);
- out_car_reason = out_car_reasons.substring(1, out_car_reasons.length);
- predict_return_time = predict_return_times.substring(1, predict_return_times.length);
- entourage = entourages.substring(1, entourages.length);
- remark = remarks.substring(1, remarks.length);
- }
- if ($("#" + o.universalid).length > 0){
- $("#" + o.universalid).val(universalid);
- }
- if ($("#" + o.application).length > 0){
- $("#" + o.application).val(application);
- }
- if ($("#" + o.application).length > 0){
- $("#" + o.application).val(application);
- }
- if ($("#" + o.car_department).length > 0){
- $("#" + o.car_department).val(car_department);
- }
- if ($("#" + o.car_people).length > 0){
- $("#" + o.car_people).val(car_people);
- }
- if ($("#" + o.destination).length > 0){
- $("#" + o.destination).val(destination);
- }
- if ($("#" + o.out_car_time).length > 0){
- $("#" + o.out_car_time).val(out_car_time);
- }
- if ($("#" + o.out_car_reason).length > 0){
- $("#" + o.out_car_reason).val(out_car_reason);
- }
- if ($("#" + o.predict_return_time).length > 0){
- if(predict_return_time == 'null'){
- $("#" + o.predict_return_time).val("");
- }else{
- $("#" + o.predict_return_time).val(predict_return_time);
- }
- }
- if ($("#" + o.entourage).length > 0){
- $("#" + o.entourage).val(entourage);
- }
- if ($("#" + o.remark).length > 0){
- $("#" + o.remark).val(remark);
- }
- dialog.close();
- $(".l-dialog-win").remove();
- }
- }, {
- text : '取消',
- onclick : function(item, dialog) {
- dialog.close();
- $(".l-dialog-win").remove();
- }} ],
- name : "listDialog"
- });
- }
- //选择驾驶员
- function chooseDriver(o){
- o = $.extend({
- driver_id : "driver_id",
- driver : "driver",
- checkbox : true
- }, o);
- $.ligerDialog.open({
- url : 'carDriverAction.do?task=toList2&lookup=lookup&checkbox='+o.checkbox,
- height : 350,
- width : 980,
- title : "驾驶员",
- buttons : [
- {
- text : '确定',
- onclick : function(item, dialog) {
- var rows = dialog.frame.f_select();
- if(rows.length == 0){
- $.ligerDialog.alert('请选择一个单位信息!', '提示', 'warn');
- return;
- }
- if(rows.length > 1){
- $.ligerDialog.alert('只能选择一个单位信息!', '提示', 'warn');
- return;
- }
- var universalids = "", driver_names = "";
- if (rows) {
- for ( var i = 0; i < rows.length; i++) {
- universalids += ("," + rows[i].universalid);
- driver_names += ("," + rows[i].driver_name);
- }
- universalid = universalids.substring(1, universalids.length);
- driver_name = driver_names.substring(1, driver_names.length);
- }
- if ($("#" + o.driver_id).length > 0){
- $("#" + o.driver_id).val(universalid);
- }
- if ($("#" + o.driver).length > 0){
- $("#" + o.driver).val(driver_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();
- }
- } */
- //获得焦点事件
- function onFocusCheck(objValue){
- //var motorcade_numbers = $("#motorcade_numbers").val();
- if(objValue != "" && typeof (objValue) != "undefined"){
- $("#application").val("");
- $("#applications").val(objValue);
- return;
- }
- }
- //失去焦点事件
- function onBlurCheck(objValue){
- var applications = $("#applications").val();
- if(objValue != "" && typeof (objValue) != "undefined"){
-
- return;
- }else{
- $("#application").val(applications);
- }
- }
- function CloseWin(){
- window.parent.dialog.close();
- }
- function refresh(obj){
- if(obj == "1"){
- var tabIframe = window.parent.document.getElementsByName("${requestScope.tabid}");
- tabIframe[0].contentDocument.getElementsByName("content2")[0].contentWindow.closeDialog();
- tabIframe[0].contentDocument.getElementsByName("content2")[0].contentWindow.location.reload();
- //window.parent.submitItemName();
- //window.parent.obj.close();
- }
- }
- function closeW(){
- var tabIframe = window.parent.document.getElementsByName("${requestScope.tabid}");
- tabIframe[0].contentDocument.getElementsByName("content2")[0].contentWindow.closeDialog();
- }
- $(document).ready(function() {
- $("[name='destination']").focus();
- refresh('${msgEvent}');
- });
- </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 id="requestForm" action="carOutCarAction.do" method="post">
- <div id="title" class="form-button">
- <input type="button" class="l-button" value="保存" onclick="checkForm()" />
- <c:if test="${type == null}">
- <input type="button" value="关闭" class="l-button" onclick="closeWindow();" />
- </c:if>
- <c:if test="${type == '1'}">
- <input type="button" value="关闭" class="l-button" onclick="closeW();" />
- </c:if>
- </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="plate_number" name="plate_number" value="${car.plate_number}" onfocus="this.blur()">
- <input type="hidden" id="plate_number_id" name="plate_number_id" value="${car.universalid}" readonly="readonly">
- <c:if test="${car.universalid == null }">
- <input type="button" class="l-button" value="选择"
- onclick="chooseCustomer({plate_number_id:'plate_number_id',plate_number:'plate_number',out_car_mileage:'out_car_mileage',motorcade:'motorcade'});" />
- </c:if>
- </td>
- </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="application" name="application" value="${application}" onfocus="this.blur()">
- <input type="hidden" id="applications" name="applications" value=""/>
- <input type="button" class="l-button" value="选择"
- onclick="chooseApplication({universalid:'universalid',application:'application',car_department:'car_department',car_people:'car_people',destination:'destination',out_car_time:'out_car_time',out_car_reason:'out_car_reason',predict_return_time : 'predict_return_time',entourage : 'entourage',remark :'remark'});" />
- <!-- onclick="chooseCustomer({car_department:'car_department',car_people:'car_people',out_car_time:'out_car_time',predict_return_time:'predict_return_time',destination:'destination',entourage:'entourage',out_car_reason:'out_car_reason',remark:'remark'});" /> -->
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">驾驶员:</td>
- <td class="l-table-edit-td">
- <input type="text" id="driver" name="driver" value="" onfocus="this.blur()">
- <input type="hidden" id="driver_id" name="driver_id" value="">
- <input type="button" class="l-button" value="选择" id="select5"
- onclick="chooseDriver({driver_id:'driver_id',driver:'driver'});"/>
- </td>
- </tr>
- <tr>
- <!-- style="border: none;" onfocus="this.blur()" -->
- <td class="l-table-edit-text">用车部门:</td>
- <td class="l-table-edit-td" colspan="3">
- <input id="car_department" name="car_department" type="text" value="${group.groupName }" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">用车人:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="car_people" name="car_people" value="${name }" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">出车时间:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="out_car_time" name="out_car_time" value="" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">预计回车时间:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="predict_return_time" name="predict_return_time" value="" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">出车里程</td>
- <td class="l-table-edit-td">
- <input type="text" id="out_car_mileage" name="out_car_mileage" value="${car.initial_range }" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
-
- <tr>
- <td class="l-table-edit-text">目的地:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="destination" name="destination" value="" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">随行人员:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="entourage" name="entourage" value="" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">所属车队:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="motorcade" name="motorcade" value="${car.motorcade_name }" style="border: none;" onfocus="this.blur()">
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">出车原因:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="out_car_reason" name="out_car_reason" value="" style="border: none;" onfocus="this.blur()" >
- <!-- <div style="float: left;">
- <textarea id="out_car_reason" name="out_car_reason" rows="3" cols="60"></textarea>
- </div> -->
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">备注:</td>
- <td class="l-table-edit-td" colspan="3">
- <input type="text" id="remark" name="remark" value="" style="border: none;" onfocus="this.blur()">
- <!-- <div style="float: left;" >
- <textarea id="remark" name="remark" rows="3" cols="60"></textarea>
- </div> -->
- <!-- <input type="text" id="dev_remark" name="dev_remark" value="${requestScope.device.dev_remark }"> -->
- </td>
- </tr>
- </table>
- <input type="hidden" id="types" name="types" value="${requestScope.type }">
- <input type="hidden" id="dev_id" name="dev_id" value="">
- <input type="hidden" id="universalid" name="universalid" value="">
- <input type="hidden" id="task" name="task" value="doAddOutCarInto">
- <input type="hidden" id="tabid" name="tabid" value="${requestScope.tabid}">
- </center>
- </div>
- </div>
- </form>
- </body>
- </html>
|