Quellcode durchsuchen

2019-09-05 15:35

xs vor 6 Jahren
Ursprung
Commit
b4f2cfd0da

Datei-Diff unterdrückt, da er zu groß ist
+ 6 - 0
src/main/webapp/static/plugin/assets/bootstrap.min.css


+ 17 - 33
src/main/webapp/webpage/modules/sg/projecttem/addItem.js

@@ -6,38 +6,22 @@
         var newText1 = parent.$('#addtext').val();
         $("#newText1").val(newText1);
     })
-function doSubmit(obj){
-    if ($("#myfile").val()==null||$("#myfile").val()==""){
-        layer.msg("请选择文件",{icon: 3});
-        throw SyntaxError;
-    }
-    if ($("#inputwrite").val()==null||$("#inputwrite").val()==""){
-        layer.msg("请输入项目名称",{icon:3});
-        throw SyntaxError;
-    }
-    //获取项目名称
-    var project_name=$("#inputwrite").val();
-    //获取工程id
-    var project_id=$("#newText1").val();
-    // $.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();
-    //         }
-    //     }
-    // });
+    function doSubmit(obj){
+        if ($("#myfile").val()==null||$("#myfile").val()==""){
+            layer.msg("请选择文件",{icon: 3});
+            throw SyntaxError;
+        }
+        if ($("#inputwrite").val()==null||$("#inputwrite").val()==""){
+            layer.msg("请输入项目名称",{icon:3});
+            throw SyntaxError;
+        }
         $("#inputForm").submit();
-}
-$("#btnxz").click(function(){
-    $("#myfile").trigger("click");
-})
-$("#myfile").bind("change",function(){
-    var solr_file= $("#myfile").val();
-    $("#view_input").val(solr_file);
-})
+    }
+    $("#btnxz").click(function(){
+        $("#myfile").trigger("click");
+    })
+    $("#myfile").bind("change",function(){
+        var solr_file= $("#myfile").val();
+        $("#view_input").val(solr_file);
+    })
 </script>

+ 16 - 13
src/main/webapp/webpage/modules/sg/projecttem/addItem.jsp

@@ -7,13 +7,14 @@
     <link rel="stylesheet" href="${ctxp}/static/plugin/assets/layui/css/layui.css">
     <link rel="stylesheet" href="${ctxp}/static/plugin/assets/common.css"/>
     <script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
-    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
-    <%--<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>--%>
+    <link rel="stylesheet" href="${ctxp}/static/plugin/assets/bootstrap.min.css">
     <style>
+
         .layui-input{ height: 28px;}
-        .layui_td{text-align: center;font-size: 14px;margin-top: 20px}
-        .modal-body{padding: 6px}
-    </style>
+        td{text-align: center;font-size: 14px;margin-top: 20px;color: #555}
+        .layui_td_1{text-align: center;font-size: 14px;width: 23%;}
+        .modal-body{padding: 10px}
+</style>
 </head>
 <body>
 <form id="inputForm"class="layui-form" action="${ctx}/project/tem/importfile" method="post" enctype="multipart/form-data">
@@ -23,12 +24,14 @@
         <%--</fieldset>--%>
         <table class="table table-bordered table-striped"  width="800px">
             <tr>
-                <td class="layui_td"><input type="button" class="layui-btn layui-btn-normal" value="选择结算文件" id="btnxz"/></td>
-                <td><input id="view_input" readonly="readonly" class="form-control" placeholder="*结算书文件为博微导出xls/xlsx格式文件">  </td>
+                <td class="layui_td_1"><input type="button" class="layui-btn layui-btn-primary layui-btn-sm" value="选择结算文件" id="btnxz"/></td>
+                <td>
+                    <input type="text" autocomplete="off" readonly="readonly" class="layui-input" placeholder="*结算书文件为博微导出xls/xlsx格式文件" id="view_input" style="background-color: whitesmoke">
+                </td>
             </tr>
             <tr>
-                <td class="layui_td">*项目划分</td>
-                <td style="color: #555;font-size: 14px"><select name="type" lay-verify="required" lay-search="">
+                <td class="layui_td_1">*项目划分</td>
+                <td ><select name="type" lay-verify="required" lay-search="">
                     <option value="">请选择</option>
                     <option value="1">架空线路工程</option>
                     <option value="2">电缆工程</option>
@@ -36,14 +39,14 @@
                 </select></td>
             </tr>
             <tr>
-                <td class="layui_td">*项目名称</td>
-                <td class="layui_td">
+                <td class="layui_td_1">*项目名称</td>
+                <td>
                     <input type="text" name="name" autocomplete="off" class="layui-input" id="inputwrite">
                 </td>
             </tr>
             <tr>
-                <td class="layui_td">项目编号</td>
-                <td class="layui_td">
+                <td class="layui_td_1">项目编号</td>
+                <td>
                     <input type="text" name="" autocomplete="off" class="layui-input">
                 </td>
             </tr>

+ 6 - 8
src/main/webapp/webpage/modules/sg/projecttem/addItem2Form.js

@@ -5,17 +5,15 @@ layui.use('upload', function(){
     var $ = layui.jquery
         ,upload = layui.upload;
     //多文件列表示例
-    var demoListView = $('#demoList')
+    var tbodyListView = $('#tbody_List')
         ,uploadListIns = upload.render({
-        elem: '#testList'
-        // ,url: '/upload/'
+         elem: '#add_List'
         ,accept: 'file'
         ,exts:'xls|xlsx'
         ,multiple: true
         ,auto: false
-        // ,bindAction: '#testListAction'
         ,choose: function(obj){
-            var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
+            // var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
             //读取本地文件
             obj.preview(function(index, file, result){
                 arrayFile.push(index);
@@ -32,12 +30,12 @@ layui.use('upload', function(){
                     ,'</tr>'].join(''));
                 //删除
                 tr.find('.demo-delete').on('click', function(){
-                    delete files[index]; //删除对应的文件
+                    // delete files[index]; //删除对应的文件
                     tr.remove();
-                    uploadListIns.config.elem.next()[0].value = '';
+                    // uploadListIns.config.elem.next()[0].value = '';
                 });
 
-                demoListView.append(tr);
+                tbodyListView.append(tr);
             });
         }
     });

+ 2 - 2
src/main/webapp/webpage/modules/sg/projecttem/addItem2Form.jsp

@@ -43,7 +43,7 @@
                                 <legend style="font-size: 15px;">添加项目</legend>
                             </fieldset>
                             <div class="layui-upload">
-                                <button type="button" class="layui-btn layui-btn-normal" id="testList">添加文件</button>
+                                <button type="button" class="layui-btn layui-btn-normal" id="add_List">添加文件</button>
                                 <div class="layui-upload-list">
                                         <table class="layui-table" id="mytable">
                                         <thead>
@@ -53,7 +53,7 @@
                                             <th width="15%">项目类型</th>
                                             <th width="15%" style="text-align: center">操作</th>
                                         </tr></thead>
-                                        <tbody id="demoList">
+                                        <tbody id="tbody_List">
 
                                         </tbody>
                                     </table>

+ 1 - 1
src/main/webapp/webpage/modules/sg/projecttem/manageList.js

@@ -99,7 +99,7 @@
     layui.use(['table','layer'],function(){
     layer.open({
     type: 2,
-    title: '添加工程',
+    title: '添加项目',
     area: ['60%', '80%'],
     shade: 0.8,
     shadeClose: true,