Browse Source

Merge remote-tracking branch 'origin/master'

蔡德晨 5 years ago
parent
commit
698979dd70
1 changed files with 64 additions and 42 deletions
  1. 64 42
      src/main/webapp/webpage/modules/sg/free/individualForm.jsp

+ 64 - 42
src/main/webapp/webpage/modules/sg/free/individualForm.jsp

@@ -7,11 +7,28 @@
     <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>
     <script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
-    <%@include file="alongst.js"%>
+    <%--<%@include file="alongst.js"%>--%>
 </head>
 <style>
     .layui-table-view .layui-table {width:100%}
     .layui-table-cell .layui-form-checkbox[lay-skin="primary"]{top: 50%;transform: translateY(-50%);}
+    .layui-icon-layer{display: none;}
+    .layui-icon-file{display: none;}
+    .layui-table-tips-main{display:none}
+    .layui-table-tips-c{display:none}
+    input {
+        height: 33px;
+        line-height: 33px;
+        padding: 0 7px;
+        border: 1px solid #ccc;
+        border-radius: 2px;
+        margin-bottom: -2px;
+        outline: none;
+    }
+
+    input:focus {
+        border-color: #009E94;
+    }
 </style>
 <body>
 <div class="layui-btn-group suretable" style="display: none;">
@@ -27,46 +44,17 @@
         <div class="" style="margin-left: 10px;">
             <input type="radio" name="mydiv" value="1" title="增加" checked="">
             <input type="radio" name="mydiv" value="2" title="减少">
+            &nbsp;&nbsp;
+            <input id="edt-search" type="text" placeholder="输入关键字" style="width: 120px;"/>&nbsp;&nbsp;
+            <button class="layui-btn" id="btn-search">&nbsp;&nbsp;搜索&nbsp;&nbsp;</button>
         </div>
     </div>
 </form>
 <div style="margin-left: 7px;margin-right: 7px">
-<%--<table class="layui-hide" id="longtable" lay-filter="longtable"></table>--%>
-    <table id="longtable" class="layui-table" lay-filter="longtable"></table>
+<table class="layui-table" id="longtable" lay-filter="longtable"></table>
 </div>
 </body>
 <script type="text/javascript">
-    <%--layui.use(['table','form','layedit', 'laydate'], function(){--%>
-        <%--var table = layui.table //生产数据表格--%>
-            <%--,form = layui.form;--%>
-        <%--form.render();//表格渲染--%>
-        <%--table.render({--%>
-            <%--elem: '#longtable'--%>
-            <%--,title: '单独调整页'--%>
-            <%--,id:'checktable'--%>
-            <%--,limit:Number.MAX_VALUE--%>
-            <%--,cols: [[ //生产表头--%>
-                <%--{type: 'checkbox'}--%>
-                <%--,{field:'wbsys',title:'分部分项'}--%>
-                <%--,{field:'wbsCode',title:'WBS识别码'}--%>
-                <%--,{field:'bl',title:'比例(%)',edit: 'text'}--%>
-                <%--,{field:'fee',title:'分摊金额',edit: 'text'}--%>
-            <%--]]--%>
-            <%--,data:[ //数据导入--%>
-                <%--<c:if test="${ not empty list}">--%>
-                <%--<c:forEach items="${list}" var="data" varStatus="index">--%>
-                <%--{--%>
-                    <%--"id":"1",--%>
-                    <%--"wbsys": "${data.describe}",--%>
-                    <%--"wbsCode": "${data.wbsCode}",--%>
-                    <%--"bl":'',--%>
-                    <%--"fee":''--%>
-                <%--},--%>
-                <%--</c:forEach>--%>
-                <%--</c:if>--%>
-            <%--]--%>
-            <%--,page: false--%>
-        <%--});--%>
     layui.config({
         base: '${ctxp}/static/plugin/assets/'
     }).extend({
@@ -86,7 +74,8 @@
                 treePidName: 'pid',
                 treeDefaultClose: false,
                 treeLinkage: false,
-                elem: '#table1',
+                id:'checktable',
+                elem: '#longtable',
                 cols: [[
                     {type: 'checkbox'},
                     {field:'wbsys',title:'分部分项'},
@@ -94,19 +83,51 @@
                     {field:'bl',title:'比例(%)',edit: 'text'},
                     {field:'fee',title:'分摊金额',edit: 'text'},
                 ]],
-                "data": [
-                    <c:if test="${ not empty list}">
-                    <c:forEach items="${list}" var="data" varStatus="index">
+                data: [
+                    <%--<c:if test="${ not empty list}">--%>
+                    <%--<c:forEach items="${list}" var="data" varStatus="index">--%>
+                    <%--{--%>
+                        <%--"id":"1",--%>
+                        <%--"wbsys": "${data.describe}",--%>
+                        <%--"wbsCode": "${data.wbsCode}",--%>
+                        <%--"bl":'',--%>
+                        <%--"fee":'',--%>
+                        <%--"pid": -1--%>
+                    <%--},--%>
+                    <%--</c:forEach>--%>
+                    <%--</c:if>--%>
                     {
                         "id":"1",
-                        "wbsys": "${data.describe}",
-                        "wbsCode": "${data.wbsCode}",
+                        "wbsys": "12",
+                        "wbsCode": "32",
+                        "bl":'',
+                        "fee":'',
+                        "pid": -1
+                    },
+                    {
+                        "id":"2",
+                        "wbsys": "121212131231",
+                        "wbsCode": "32",
+                        "bl":'',
+                        "fee":'',
+                        "pid": 1
+                    },
+                    {
+                        "id":"3",
+                        "wbsys": "12123123",
+                        "wbsCode": "32",
                         "bl":'',
                         "fee":'',
                         "pid": -1
                     },
-                    </c:forEach>
-                    </c:if>
+                    {
+                        "id":"4",
+                        "wbsys": "12123123",
+                        "wbsCode": "32",
+                        "bl":'',
+                        "fee":'',
+                        "pid": 3
+                    }
                 ],
                 done: function (res, curr, count) {
                     layer.closeAll('loading');
@@ -171,6 +192,7 @@
                     feecount=Number(feecount)+Number(objdata[i].fee);
                 }
                 if(blcount!=100||feecount!=moneycount2){
+                    alert(blcount+feecount);
                     layer.msg('比例/金额分配不正确!');
                     return false;
                 }