Sfoglia il codice sorgente

清单规则编辑器上移下移问题

zhongzewei 7 anni fa
parent
commit
034242c6fc

+ 3 - 0
public/web/common_ajax.js

@@ -29,6 +29,9 @@ function getTopWindow() {
 }
 
 var CommonAjax = {
+    get:function (url,data,cb,dataType) {
+        $.get(url,data,cb,dataType)
+    },
     post: function (url, data, successCallback, errorCallback) {
         $.ajax({
             type:"POST",

+ 6 - 0
web/maintain/bills_lib/html/qingdan.html

@@ -693,6 +693,12 @@
             }
             sheet.resumePaint();
             billsAjax.pasteBills(userAccount, billsLibId, validDatas);
+            for(let vData of validDatas){
+                let node  = controller.tree.nodes['id_' + vData.ID];
+                if(node){
+                    Object.assign(node.data, vData);
+                }
+            }
             sheet.setRowCount(sheetBillsDatas.datas.length);
         });
     }

+ 1 - 0
web/maintain/bills_lib/scripts/db_controller.js

@@ -300,6 +300,7 @@ var dbController = {
                     btn.attr('doing', 'false');
                     controller.upMove();
                     sheetBillsDatas = tools.getsheetDatas(controller.sheet, 'bills', controller);
+
                     controller.sheet.getParent().focus(true);
                 });
             }

+ 45 - 5
web/users/views/tool/index.html

@@ -9,31 +9,31 @@
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>清单规则编辑器
-                        <a href="/stdBillsmain" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="billsLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>定额编辑器
-                        <a href="/rationRepository/main" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="rationLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>报表模板
-                        <a href="/rpt_tpl" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="rptTemplate" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>人材机库
-                        <a href="/stdGljRepository/main" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="gljLib" href="javascript:void(0);" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
                 <div class="c-body">
                     <h2>清单指引编辑器
-                        <a href="/billsGuidance/main" class="btn btn-primary pull-right">进入</a></h2>
+                        <a id="billsGuidanceLib" href="/billsGuidance/main" class="btn btn-primary pull-right">进入</a></h2>
                 </div>
             </div>
             <div class="col-xs-6 mb-30 ">
@@ -74,6 +74,46 @@
 <script type="text/javascript" src="/public/web/PerfectLoad.js"></script>
 <script type="text/javascript">
     $(document).ready(function () {
+        $('#billsLib').click(function () {
+            let href = '/stdBillsmain';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#rationLib').click(function () {
+            let href = '/rationRepository/main';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#rptTemplate').click(function () {
+            let href = '/rpt_tpl';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#gljLib').click(function () {
+            let href = '/stdGljRepository/main';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
+        $('#billsGuidanceLib').click(function () {
+            let href = '/billsGuidance/main';
+            let newTab = window.open('about:blank');
+            CommonAjax.get(href, {}, function () {
+               newTab.location.href = href;
+            });
+        });
+
         $('#clearJunkBtn').click(function () {
             $('#clearJunkModal').modal('show');
         });