|
@@ -1,44 +1,42 @@
|
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
-<script type="text/javascript">
|
|
|
|
|
|
+ <script type="text/javascript">
|
|
layui.use(['form', 'layedit', 'laydate'], function(){
|
|
layui.use(['form', 'layedit', 'laydate'], function(){
|
|
- var form = layui.form;
|
|
|
|
- form.render();
|
|
|
|
- var newText1 = parent.$('#addtext').val();
|
|
|
|
- $("#newText1").val(newText1);
|
|
|
|
-})
|
|
|
|
- function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
|
|
|
|
|
|
+ var form = layui.form;
|
|
|
|
+ form.render();
|
|
|
|
+ var newText1 = parent.$('#addtext').val();
|
|
|
|
+ $("#newText1").val(newText1);
|
|
|
|
+ })
|
|
|
|
+function doSubmit(obj){
|
|
if ($("#myfile").val()==null||$("#myfile").val()==""){
|
|
if ($("#myfile").val()==null||$("#myfile").val()==""){
|
|
- layer.msg("请选择文件",{icon: 3});
|
|
|
|
- throw SyntaxError;
|
|
|
|
-}
|
|
|
|
|
|
+ layer.msg("请选择文件",{icon: 3});
|
|
|
|
+ throw SyntaxError;
|
|
|
|
+ }
|
|
if ($("#inputwrite").val()==null||$("#inputwrite").val()==""){
|
|
if ($("#inputwrite").val()==null||$("#inputwrite").val()==""){
|
|
- layer.msg("请输入项目名称",{icon:3});
|
|
|
|
- throw SyntaxError;
|
|
|
|
-}
|
|
|
|
|
|
+ layer.msg("请输入项目名称",{icon:3});
|
|
|
|
+ throw SyntaxError;
|
|
|
|
+ }
|
|
//获取项目名称
|
|
//获取项目名称
|
|
var project_name=$("#inputwrite").val();
|
|
var project_name=$("#inputwrite").val();
|
|
//获取工程id
|
|
//获取工程id
|
|
var project_id=$("#newText1").val();
|
|
var project_id=$("#newText1").val();
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: "${ctx}/project/tem/verfiy",
|
|
|
|
- type: "post",
|
|
|
|
- data: {"projectName":project_name,"projectId":project_id},
|
|
|
|
- success:function (result) {
|
|
|
|
- if (result.code == 1){
|
|
|
|
- layer.msg(result.msg,{icon:5});
|
|
|
|
-}else {
|
|
|
|
- $("#inputForm").submit();
|
|
|
|
|
|
+ url: "${ctx}/project/tem/verfiy",
|
|
|
|
+ type: "post",
|
|
|
|
+ data: {"projectName":project_name,"projectId":project_id},
|
|
|
|
+ success:function (result) {
|
|
|
|
+ if (result.code == 1){
|
|
|
|
+ layer.msg(result.msg,{icon:5});
|
|
|
|
+ }else {
|
|
|
|
+ $("#inputForm").submit();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
-}
|
|
|
|
-});
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
- $("#btnxz").click(function(){
|
|
|
|
|
|
+$("#btnxz").click(function(){
|
|
$("#myfile").trigger("click");
|
|
$("#myfile").trigger("click");
|
|
})
|
|
})
|
|
-
|
|
|
|
- $("#myfile").bind("change",function(){
|
|
|
|
|
|
+$("#myfile").bind("change",function(){
|
|
var solr_file= $("#myfile").val();
|
|
var solr_file= $("#myfile").val();
|
|
$("#myspan").html(' '+solr_file);
|
|
$("#myspan").html(' '+solr_file);
|
|
-});
|
|
|
|
|
|
+})
|
|
</script>
|
|
</script>
|