| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <%@ page language="java" contentType="text/html; charset=gbk"
- pageEncoding="gbk"%>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gbk">
- <meta name="renderer" content="ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge;">
- <meta http-equiv="PRAGMA" content="no-cache">
- <meta http-equiv="Cache-Control" content="no-cache">
- <meta http-equiv="Expires" content="0">
- <%@ include file="/yw/bpm/configuration/common.jsp"%>
- <link href="${pageContext.request.contextPath }/yw/bpm/configuration/configuration.css" rel="stylesheet"></link>
- <link href="/shares/js/yw/bpm/bootstrap/jquery-validation-1.11.1/demo/css/screen.css" rel="stylesheet"></link>
- <script type="text/javascript" src="/shares/js/yw/bpm/bootstrap/jquery-validation-1.11.1/dist/jquery.validate.js"></script>
- <script type="text/javascript" src="/shares/js/yw/bpm/bootstrap/jquery-validation-1.11.1/localization/messages_zh.js"></script>
- <title>流程配置</title>
- <script type="text/javascript">
- var contextPath = "${pageContext.request.contextPath }";
- $(function(){
- $("#footer").css("margin-top", window.screen.height-215);
- // 表单验证配置
- $("#form2").validate({
-
- });
- $("#file").rules("add", {
- required: true,
- valFileName: true
- });
- });
- function uploadFile(){
- var bool = $("#form2").valid();
- if(bool == false){
- return false;
- }
- $("#file").attr("readonly","readonly");
- $("#form2").submit();
- $(document).progressDialog.showDialog("正在上传,请稍后...");
- }
- function callback(seq){
- var fileId = seq;
- $.ajax({
- url : "bpmFormConfigAction.do?task=upload&time="+new Date(),
- async : true,
- type : "post",
- data : {"fileId":fileId},
- dataType : 'json',
- success : function(data) {
- $(document).progressDialog.hideDialog();
- // var result = data.result;
- var formId = data.formId;
- location='bpmFormConfigAction.do?task=toFormVersion&formId='+formId;
- },
- error : function(data) {
- $(document).progressDialog.hideDialog();
- $("#file").removeAttr("readonly");
- alert("数据处理失败,请检查网络重新登录或联系管理员!");
- }
- });
- }
- String.prototype.endWith = function(param) {
- if (param == null || param == "" || this.length == 0
- || param.length > this.length) {
- return false;
- }
- if (this.substring(this.length - param.length) == param) {
- return true;
- } else {
- return false;
- }
- };
- jQuery.validator.addMethod("valFileName", function(value, element) {
- var file = value;
- if (file.endWith('.xsn') || file.endWith('.XSN')){
- return true;
- } else {
- return false;
- }
- }, "请选择.xsn后缀文件!");
- </script>
- </head>
- <body>
- <!-- 底部按钮区域 -->
- <div class="navbar navbar-default navbar-fixed-top" id="footer">
- <div class="container-fluid text-right well well-sm">
- <button type="button" class="btn btn-info btn-sm" onclick="location.reload()">
- <span class="glyphicon glyphicon-refresh"></span> 刷新</button>
- <button type="button" class="btn btn-primary btn-sm" onclick="uploadFile();">
- <span class="glyphicon glyphicon-chevron-right"></span> 下一步</button>
- </div>
- </div>
- <!-- 底部按钮区域 -->
- <form action="bpmUploadFile.do" method="post" role="form" id="form2" enctype="multipart/form-data" target="check_file_frame">
- <!-- 隐藏元素 -->
- <!-- 隐藏元素 -->
- <!-- 配置区域 -->
- <div class="container-fluid" style="margin-top: 35px;" id="center">
- <div class="row">
- <div class="form-group col-md-offset-1">
- <label>上传表单模版
- <span class="badge badge-success" data-placement="bottom" title="上传后缀名为xsn的表单模版文件.">?</span>
- </label>
- <input type="file" name="file" id="file">
- <p>请上传后缀名为xsn的表单模版文件</p>
- <!-- <input type="button" onclick="uploadFile();" value="上传表单"> -->
- </div>
- </div>
- </div>
- <iframe name="check_file_frame" style="display:none;"></iframe>
- <!-- 配置区域 -->
- </form>
- </body>
- </html>
|