MaiXinRong 3 vuotta sitten
vanhempi
commit
a732c54c17
2 muutettua tiedostoa jossa 3 lisäystä ja 10 poistoa
  1. 2 2
      app/base/base_tree_service.js
  2. 1 8
      app/public/js/shares/cs_tools.js

+ 2 - 2
app/base/base_tree_service.js

@@ -915,7 +915,7 @@ class TreeService extends Service {
         if (!count) count = 1;
         const selects = await this.getDataByKidAndCount(mid, kid, count);
         if (!selects) throw '降级节点数据错误';
-        const first = selects[0];
+        const first = selects[0], last = selects[count - 1];
         const pre = await this.getDataByParentAndOrder(mid, first[this.setting.pid], first[this.setting.order] - 1);
         if (!pre) throw '节点不可降级';
         const preLastChild = await this.getLastChildData(mid, pre[this.setting.kid]);
@@ -924,7 +924,7 @@ class TreeService extends Service {
         this.transaction = await this.db.beginTransaction();
         try {
             // 选中节点--全部后节点 order--
-            await this._updateChildrenOrder(mid, first[this.setting.pid], first[this.setting.order] + 1, -count);
+            await this._updateChildrenOrder(mid, first[this.setting.pid], last[this.setting.order] + 1, -count);
 
             for (const [i, s] of selects.entries()) {
                 // 选中节点 修改pid, level, order, full_path

+ 1 - 8
app/public/js/shares/cs_tools.js

@@ -73,6 +73,7 @@ const showSelectTab = function(select, spread, afterShow) {
                         title: '错误类型', field: 'errorType', width: 60, formatter: '@',
                         getValue: function (x) {
                             switch (x.errorType) {
+                                case 'gather': return '汇总错误';
                                 case 'qty': return '数量';
                                 case 'tp': return '金额';
                                 case 'over': return '超计';
@@ -494,14 +495,6 @@ const showSelectTab = function(select, spread, afterShow) {
                 }
             }
             filter.push('</select>');
-            // filter.push('<div class="input-group-prepend">');
-            // filter.push('<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">台账</button>');
-            // filter.push('<div class="dropdown-menu">');
-            // filter.push('<a class="dropdown-item" href="javascripty: void(0)" id="search-bills">台账</a>');
-            // filter.push('<a class="dropdown-item" href="javascripty: void(0)" id="search-over">超计</a>');
-            // filter.push('<a class="dropdown-item" href="javascripty: void(0)" id="search-less">漏计</a>');
-            // filter.push('</div>');
-            // filter.push('</div>');
         }
         obj.html(
             '                        <div class="sjs-bar">\n' +