Ver código fonte

调整页添加调整按钮

user5 4 anos atrás
pai
commit
9202455751
1 arquivos alterados com 35 adições e 1 exclusões
  1. 35 1
      src/main/webapp/webpage/modules/sg/free/wbslist.js

+ 35 - 1
src/main/webapp/webpage/modules/sg/free/wbslist.js

@@ -23,8 +23,18 @@ layui.config({
     page: false,
     cols: [[ //加载下拉表格二级表头
     {type:'numbers',title: '序号', rowspan: 2, totalRowText: "合计",},
-    {field: 'wbsys', title: 'WBS要素',width:200, rowspan:'2'},
+    {field: 'wbsys', align:'center', title: 'WBS要素',width:200, rowspan:'2'},
+    {field: 'requireSubNode', align:'center', title:"调整",width:130, rowspan:'2', templet:function(d){
+            ////对操作进行初始化
+            var xml = "";
+            if(d.requireSubNode){ //调整按钮
+                xml +="<a style='margin-top: 3px;' class='layui-btn layui-btn-xs'  onclick=\"adjustment('${ctx}/jkxl/getSubNode?id=" + d.subNodeId + "')\">调整</a>"
+            }else {
+                xml +=""
+            }
 
+            return xml;
+        }},
     {field:'wbssbm',width:100, align:'center',rowspan:'2',title:"wbs识别码"},
     {field:'fbfxysj', align:'center', title: '分部分项',colspan:'6'},
     //{field:'fbfxtch',align:'center',title:'分部分项(调差后)',colspan:'4'},
@@ -82,6 +92,8 @@ layui.config({
         "gf":doIt(${data.fees}),
         "sf":doIt(${data.tex}),
         "hj": doIt(${data.totalFee}),
+        "requireSubNode":"${data.requireSubNode}",
+        "subNodeId":"${data.id}",
         "pid":"${data.parentNode}"
     },
     </c:forEach>
@@ -249,6 +261,28 @@ layui.use(['table', 'form', 'element', 'treetable'], function () {
             })
         })
     }
+
+    function adjustment(url){ //调整 弹出层
+        layui.use(['table','layer'],function(){
+            layer.open({  //弹出层页面
+                type: 2,
+                title: '调整',
+                area: ['80%', '95%'], //设置弹出层大小
+                shade: 0.8,
+                maxmin: true,  //最大最小值
+                shadeClose: true,
+                content: url  //弹出层路径
+                , btn: ['确定','关闭']
+                ,yes: function(index, layero){
+                    var bodyparent = layer.getChildFrame('body', index); //当前页面 获取子类(弹出层body)的属性
+                    bodyparent.find('#freenl').click();  //获取子类页面的按钮,点击事件。
+                }
+                ,btn2: function(index, layero){
+                    layer.close(index); //管理弹出层
+                }
+            })
+        })
+    }
     layui.use('table', function(){ //结算汇总表部分
         var table = layui.table;
         table.render({