| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337 |
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ page import="com.runzhixing.tool.Util" %>
- <%@ page import="com.runzhixing.bean.CityPlace" %>
- <%@ page import="com.runzhixing.bean.CountryPlace" %>
- <%@ page import="com.runzhixing.bean.Station" %>
- <%@ page import="com.runzhixing.bean.AuthorityRegionPlace" %>
- <%@ page import="com.runzhixing.bean.User" %>
- <%@ page import="com.runzhixing.constant.Constant" %>
- <%
- String path = request.getContextPath();
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
- User user = (User)session.getAttribute(Constant.userMark);
- List<AuthorityRegionPlace> arplist = user.getPrivilegePlaces1();
- List<CityPlace> cplist = new ArrayList<CityPlace>();
- List<CountryPlace> cyplist = new ArrayList<CountryPlace>();
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <base href="<%=basePath%>">
-
- <title>添加公告信息</title>
-
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="This is my page">
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta http-equiv="X-UA-Compatible" content="IE=10"/>
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
- <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
- <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
- <script type="text/javascript" src="css/easyui/jquery.easyui.min.js" charset="utf-8"></script>
- <script type="text/javascript" src="css/easyui/locale/easyui-lang-zh_CN.js" charset="utf-8"></script>
- <link rel="stylesheet" type="text/css" href="css/common/hzbstyle.css">
- <style type="text/css">
- a:HOVER{
- color: red;
- text-decoration: none;
- }
- a{
- color: #f08300;
- text-decoration: none;
- }
- </style>
- <script type="text/javascript" src="js/easyui/export.js"></script>
- <script type="text/javascript">
- var grid="";
- var exportString="";
- $(document).ready(function(){
- alert("1");
- $("#pubtime").datebox("setValue",GetDateStr(0));
- selectCountry();
- });
-
- function GetDateStr(AddDayCount) {
- var dd = new Date();
- dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期
- var y = dd.getFullYear();
- var m = dd.getMonth()+1;//获取当前月份的日期
- var d = dd.getDate();
- return y+"-"+m+"-"+d;
- }
- function fLoadData(){
- var v = document.getElementById("publisher").value;
- if(!v||v.replace(/(^s*)|(s*$)/g, "").length ==0){//v不为空格和null
- show("发布人不能为空");
- return false;
- }
- var v1 = $("#pubtime").datebox("getValue");
-
- if(!v1||v1.replace(/(^s*)|(s*$)/g, "").length ==0){//v不为空格和null
- show("发布时间不能为空");
- return false;
- }
- var v2 = document.getElementById("title").value;
- if(!v2||v2.replace(/(^s*)|(s*$)/g, "").length ==0){//v不为空格和null
- show("标题不能为空");
- return false;
- }
- var v3 = document.getElementById("content").value;
- if(!v3||v3.replace(/(^s*)|(s*$)/g, "").length ==0){//v不为空格和null
- show("内容不能为空");
- return false;
- }
-
- $.messager.progress({
- title: '请等待',
- msg: '正在加载数据...',
- text: '查询中.......'
- });
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- data:$('#releaseAnnform').serialize(),
- url:"ajax/releaseAnnformform?page="+page+"&psize="+rows,
- success:function (data){
- $.messager.progress('close');
- var obj=eval("(" + data + ")");
- $.each(obj.rows, function(i,item){
- if(item.sresult=="0"){
- // msgShow('系统提示', '恭喜,密码修改成功!<br>您的新密码为:' + item.pass, 'info');
- show("发布公告成功,标题:"+item.pass);
- }else{
- show("发布公告成功失败.");
- }
- });
- }
- });
-
-
- }
-
- function show(message) {
- $.messager.show({
- title: '提示信息',
- msg: message,
- timeout: 2000,
- showType: 'slide'
- });
- }
-
-
-
-
- function selectCountry(){
- var id=document.getElementById("city").value;
- var select = document.getElementById("country");
- if(select.options.length>=1){
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- }
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- url:"ajax/hiddenCity?cityId="+id,
- success:function (data){
- var obj=eval("(" + data + ")");
- $.each(obj.rows, function(i,item){
- select.options.add(new Option(item.name, item.id));
- });
-
-
- }
- });
- }
-
- function selectCountry1(){
- selectCountry();
- selectCompany();
- changeSize();
- }
-
- function selectCompany(){
- var ii=1;
- var select = document.getElementById("company");
-
- for(var i=select.options.length-1;i>=0;i--) {
- select.options.remove(i);
- }
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- data:$('#Cylinder11form').serialize(),
- url:"ajax/hiddenUnit",
- success:function (data){
- var obj=eval("(" + data + ")");
- $.each(obj.rows, function(i,item){
- if(ii==1){
- select.options.add(new Option("全部", ""));
- ii++;
- }
- select.options.add(new Option(item.name, item.id));
- });
-
-
- }
- });
- }
- function selectCompany1(){
- selectCompany();
- changeSize();
- }
- function exptSingle(){
- if(!grid){
- alert("数据为空");
- return false;
- }else{
- expt(grid);
- }
-
- }
- function exptAll(){
- fLoadDataAll(1,5000);
- }
-
- function fLoadDataAll(page,rows){
- $.messager.progress({
- title: '请等待',
- msg: '正在加载数据...',
- text: '查询中.......'
- });
- $.ajax({
- type:"POST",
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- data:$('#Cylinder11form').serialize(),
- url:"ajax/cylinderDataQuery?page="+page+"&psize="+rows,
- success:function (data){
- $.messager.progress('close');
- var vData = $.parseJSON(data);
- sum = vData.total;
- totalpage = Math.ceil(sum/rows);
- var vData = $.parseJSON(data);
- $('#tt').datagrid('loadData', vData); //将数据绑定到datagrid
- if(!grid){
- alert("数据为空");
- return false;
- }else{
- expt(grid);
- }
- }
- });
-
-
- }
- </script>
-
- </head>
-
- <body>
- <!-- 查询结果:数据表格 -->
- <table id="tt" cellspacing="0" cellpadding="0" >
- </table>
- <center>
- <div id="toolbar" style="padding-top: 10px;height: auto;">
- <form id="releaseAnnform" action="ajax/releaseAnnformform" method="post">
- <table>
- <tr>
- <td>
- <span class="hzbspan" >接收省:</span>
- <select name="province" id="province" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan">
- <%for(AuthorityRegionPlace arp:arplist){
- cplist = arp.getCityPlace();
- %>
- <option value="<%=arp.getId() %>">
- <%=arp.getName() %>
- </option>
- <%} %>
- </select>
- </td><td>
- <span class="hzbspan">接收市:</span>
- <select name="city" id="city" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" onchange="selectCountry1()">
-
- <%
-
- for(CityPlace cp:cplist){
- cyplist = cp.getSubPlaceList();
- %>
-
- <option value="<%=cp.getId() %>">
- <%=cp.getName() %>
- </option>
-
-
- <%} %>
- </select>
- </td><td>
- <span class="hzbspan" >接收县:</span>
- <select name="country" id = "country" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" onchange="selectCompany1();" >
- </select>
- </td>
- </tr>
-
-
- <tr>
- <td>
- <span class="hzbspan" >站点类型:</span>
- <select name="stationtype" id = "stationtype" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" >
- <option value="01" selected="selected">监管机构</option>
- <option value="02">检验机构</option>
- <option value="03">改装厂</option>
- <option value="04">充装站</option>
- </select>
- </td>
- <td>
- <span class="hzbspan" style="font-weight: bold;color: red;">发布人:</span>
- <input type="text" name="publisher" id="publisher" style="width: 100px;height: 24px; " class="hzbspan">
- </td>
-
- <td>
- <span class="hzbspan" style="font-weight: bold;color: red;">发布日期:</span>
- <input type="text" name="pubtime" id="pubtime" class="easyui-datebox" id="pubtime" style="width: 100px;height: 24px;" class="hzbspan">
- </td>
-
-
- </tr>
- <tr>
- <td>
- <span class="hzbspan" >信息状态:</span>
- <select name="state" id = "state" style="width: auto;height: 24px;min-width: 100px;" class="hzbspan" >
- <option value="0" selected="selected">有效</option>
- <option value="1">待发</option>
- <option value="2">无效</option>
- </select>
- </td>
-
- <td colspan="2">
- <span class="hzbspan" style="font-weight: bold;color: red;">标题:</span>
- <input type="text" name="title" id="title" style="width: 340px;height: 24px;" class="hzbspan">
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <span class="hzbspan" style="font-weight: bold;color: red;" >内容:</span>
- <textarea name="content" id="content" cols="80" rows="10" class="hzbspan"></textarea>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <a id="btninfosearch" onclick="changeSize();" class="easyui-linkbutton" icon="icon-save" href="javascript:void(0)" style="margin-bottom: 5px;" ><span class="hzbspan" style="color: #f08300;font-size: 16px;">提 交 </span></a>
- (红色为必填项)
- </td>
- </tr>
- </table>
- </form>
- </div>
- </center>
-
- </body>
- </html>
|