1. 程式人生 > >form表單提交後彈框提示

form表單提交後彈框提示

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>發貨</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">


<%@ include file="/gzsywl.jsp"%>
<script src="${contextPath }/gzsywl/js/bootstrapValidator_zc.js"></script>
    <!-- 字型圖示src -->
    <link rel="stylesheet" href="${contextPath }/gzsywl/zititubiao/demo.css">
    <script src="${contextPath }/gzsywl/zititubiao/iconfont.js"></script>
    <!-- 網頁src -->
    <link rel="stylesheet" href="${contextPath }/gzsywl/css/gzsIndex.css"/>
    <script src="${contextPath }/gzsywl/js/gzsmenhu.js"></script>
    <!-- 時間控制元件src -->
    <link href="${contextPath }/gzsywl/css/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
<!-- 網頁src -->
<link rel="stylesheet" href="/jslib/dist/css/bootstrapValidator.css" />
<script src="${contextPath }/ci/getDic"></script>
<script src="${contextPath }/jslib/dist/js/bootstrapValidator.js"></script>
<script src="${contextPath }/jslib/dist/js/language/zh_CN.js"></script>
<script src="${contextPath }/jslib/time/script/bootstrap-datetimepicker.js"></script>
<script src="${contextPath }/jslib/time/script/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${contextPath }/jslib/js/maintenance/park/datetimepicker.js"></script>

<script src="${contextPath }/jslib/js/portals/consigor/delivery.js"></script>

<script type="text/javascript">
function back() {
location.href="${contextPath }/findTruck/companyList";
}
</script>
<style>
small{
padding-left:0px !important;
}
.form-control-feedback{
top:4px !important;
}
</style>
  </head>
  
  <body>
  <div class="wyl_xinwen wyl_newList">
  <%@include file="/WEB-INF/web/public/footertitle.jsp" %>
  <div class="wyl_xinwen_mbx wyl_newList_mbx">
            <span href="#">當前位置:</span>
            <span>></span>
            <span href="#">首頁</span>
            <span>></span>
            <a href="/findTruck/consignor">服務列表</a>
            <span>></span>
            <span href="#">發貨</span>
    </div>
    
    <div style="border:1px solid #dcdcdc;margin-bottom:100px;padding-bottom:50px;">
   
    <form id="myForm" action="/findTruck/savePushCargo" method="post">
   
   <div class="wyl_newList_width" style="margin-top:20px;">
   
   <ul class="wyl_newCol_33">
                   <li>
                       <p>裝貨地:</p>
                       <div class="wyl_work_many form-group">
                        <select class="wyl_work_manySelect" name="tCargo.province" required id="province"
jtype="000000" jdb="province" jload="jsdict" to="city" jid="${tCargo.province }">
</select>
                   </div>
                   </li>
                   <li>
                   <p></p>
                   <div class="wyl_work_many form-group">
                   <select name="tCargo.city" class="wyl_work_manySelect form-control"  id="city"
jtype="" jdb="city" jload="jsdict" to="county" jid="${tCargo.city }" required>
</select>
</div>
                   </li>
                   <li>
                   <p></p>
                   <div class="wyl_work_many form-group">
                   <select name="tCargo.county" class="wyl_work_manySelect form-control"id="county"
jtype="" jdb="county" jload="jsdict" jid="${tCargo.county }" required>
</select>
</div>
                   </li>
             </ul>
             <ul class="wyl_newCol_33">
                   <li style="width:100%;">
                   <p>裝貨地詳細地址:</p>
                   <div class="wyl_work_many form-group" style="width:50%;">
                   <span></span>
                   <input class="wyl_work_manyInput wyl_work_manyAddress form-control" style="width:100%;" value="${tCargo.addinfo }" name="tCargo.addinfo" type="text" placeholder="請輸入詳細裝貨地址" required >
                   </div>
                   </li>
             </ul>
             <ul class="wyl_newCol_33">
                   <li>
                   <p>卸貨地:</p>
                   <div class="wyl_work_many form-group">
                   <select id="province1" name="tCargo.province1"
jtype="000000" jdb="province" jload="jsdict" to="city1"jid="${tCargo.province1 }" required>
</select>
</div>
                   </li>
                   <li>
                   <p></p>
                   <div class="wyl_work_many form-group">
                   <select class="wyl_work_manySelect form-control" id="city1"
jtype="" jdb="city" jload="jsdict" to="county1" name="tCargo.city1" jid="${tCargo.city1 }" required>
</select>
</div>
                   </li>
                   <li>
                   <p></p>
                   <div class="wyl_work_many form-group">
                   <select class="wyl_work_manySelect form-control" id="county1"
jtype="" jdb="county" jload="jsdict" name="tCargo.county1" jid="${tCargo.county1 }" required>
</select>
</div>
                   </li>
              </ul>
              <ul class="wyl_newCol_33">
                   <li style="width:100%;">
                   <p>卸貨地詳細地址:</p>
                   <div class="wyl_work_many form-group" style="width:50%;">
                   <input class="wyl_work_manyInput wyl_work_manyAddress form-control" style="width:100%;" type="text" name="tCargo.addinfo1" value="${tCargo.addinfo1 }" placeholder="請輸入詳細卸貨地址" required>
                   </div>
                   </li>
              </ul>
              <ul class="wyl_newCol_33">
                   <li>
                   <p>期望車型:</p>
                   <div class="wyl_work_many form-group">
                   <select id="type" class="wyl_work_manySelect form-control"jtype="cartype"
name="tCargo.cartype" jdb="sys_dic" jload="jsdict" jid="${tCargo.cartype }" onchange="search();" required>
     </select>
     </div>
                   </li>
                   <li>
                   <p>車輛長度 :</p>
                   <div class="wyl_work_many form-group">
                   <select id="long" class="wyl_work_manySelect form-control"jtype="carlong"
name="tCargo.carsize" jdb="sys_dic" jload="jsdict" jid="${tCargo.carsize }" onchange="search();" required>
     </select><span style="line-height:40px;">米</span>
     </div>
                   </li>
                   <li>
                   <p>貨物型別:</p>
                   <div class="wyl_work_many form-group">
                   <select  name="tCargo.type"  class="wyl_work_manySelect form-control" jtype="goodstype"
jdb="sys_dic" jload="jsdict" jid="${tCargo.type }" required>
</select>
</div>
                   </li>
              </ul>
              <ul class="wyl_newCol_33">
                   <li>
                   <p>貨物名稱:</p>
                   <div class="wyl_work_many form-group">
                   <input class="wyl_work_manyInput wyl_work_manyAddress form-control" type="text" name="tCargo.name" placeholder="貨源名稱" value="${tCargo.name }" required/>
                   </div>
                   </li>
                   <li>
                   <p>貨物數量:</p>
                   <div class="wyl_work_many form-group" style="float:left;clear:none;">
                   <input class="wyl_work_manyInput wyl_work_manyAddress form-control" type="text" name="tCargo.num" placeholder="貨物數量" value="${tCargo.num }" required/>
                   </div>
                   <div class="wyl_work_many form-group" style="float:left;clear:none;">
                   <select name="tCargo.goodsunit" style="width: 70px;"
jtype="goodsweight" jdb="sys_dic" jload="jsdict" jid="${tCargo.goodsunit }" required>
</select>
</div>
                   </li>
                   <li>
                   <p>裝貨時間:</p>
                   <div class="form-group" style="margin:0;float:left;width:auto;width:202px;height:42px;">
          <div class="input-group date form_date col-md-5" style="width:202px;">
              <input class="form-control" id="zhsj"  size="16" type="text" name="tCargo.ztime" value="${tCargo.ztime }" readonly style="width:202px;padding:0;height:40px;">
              <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
          </div>
      </div>
                   </li>
              </ul>
              <ul class="wyl_newCol_33">
                   <li>    
                   <p>發貨人姓名:</p>
                   <div class="wyl_work_many form-group">
                   <input class="wyl_work_manyInput wyl_work_manyAddress form-control" type="text" name="tCargo.fname" value="${tCargo.fname }" placeholder="發貨人姓名" required pattern="^([\w\W]){1,50}$" data-bv-message="字數最多50字" />
                   </div>
                   </li>
                   <li>
                   <p>手機號:</p>
                  <div class="wyl_work_many form-group">
                   <input class="wyl_work_manyInput wyl_work_manyAddress form-control" type="text" name="tCargo.fphone" value="${tCargo.fphone }" placeholder="手機號"  required pattern="^1[34578]\d{9}$" data-bv-message="手機號碼格式不正確"/>
                  </div>
                   </li>
              </ul>    
           </ul>
   
   <div class="wyl_newType">
               <p>簡介:</p>
              <div class="wyl_work_many form-group">   
               <textarea name="tCargo.content" class="wyl_work_manySpeak" style="margin: 0px 0px 0px 4px; width: 300px; height: 80px;float:none;" required pattern="^([\w\W]){1,300}$" data-bv-message="字數最多300字">${tCargo.content }</textarea>
               </div>
                </div>
                
   <div class="wyl_newType" style="clear:both;">
                   <p>請選擇物流企業:</p>
                   <ul id="cbox" class="wyl_newEnterprise">
                   
                   </ul>
                </div>
                
                <div style="width:100%;overflow:hidden;margin-top:20px;">
                    <div style="width:200px;margin:0px auto;">
                        <button type="submit" class="wyl_newButton">提交</button>
                        <button class="wyl_newButton" onclick="back();">返回</button>
                    </div>
                </div>
                
   </div>
   
   </form>
   
    </div>
    
  </div>
  
  <script type="text/javascript">
  function checkAll(obj){
  $("#cbox input[type='checkbox']").prop('checked',$(obj).prop('checked'));
  }
  function search(){
  type = $("#type").val();
  long = $("#long").val();
  $.ajax({
    url : "/findTruck/findCompany",
    data : {
       type : type,
    long : long
    },
    async : false,
    type : 'post',
    success : function(result){
    var str = "<input type='checkbox'  onclick='checkAll(this);'>全選<br>";
    var list =  result.obj;
    for ( var l in list) {
var re =list[l];
str += "<li><div class='checkbox' style='line-height:26px;'><label><input style='width:20px;height:20px;' type='checkbox' name='ckbox' value="+re.id+">"+"<span style='margin-left:10px;'>"+re.name+"</span></label> </div></li>"; 
}
$("#cbox").html(str);
    }
    });
  }
  </script>


  </body>
</html>