Browse Source

单价调整,刷新相关

MaiXinRong 2 years ago
parent
commit
3094a3b17f
2 changed files with 7 additions and 6 deletions
  1. 2 2
      app/public/js/path_tree.js
  2. 5 4
      app/public/js/revise_price.js

+ 2 - 2
app/public/js/path_tree.js

@@ -387,8 +387,8 @@ const createNewPathTree = function (type, setting) {
             }
         }
 
-        loadFilter(select, filterType = 'filter') {
-            const defaultValue = filterType === 'filter' ? true : false;
+        loadFilter(select, filterType = 'access') {
+            const defaultValue = filterType === 'access' ? true : false;
             this.select = select ? select.split(',') : [];
             for (const d of this.datas) {
                 d.filter = defaultValue;

+ 5 - 4
app/public/js/revise_price.js

@@ -117,9 +117,6 @@ $(document).ready(() => {
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
         readOnly: true,
-        getForeColor: function (sheet, data, row, col, defaultColor) {
-            return data && data.valid ? defaultColor : '#ddd';
-        },
     };
     autoFlashHeight();
     const bcontent = $(".bcontent-wrap").length > 0 ? $(".bcontent-wrap").height() : 0;
@@ -201,7 +198,7 @@ $(document).ready(() => {
                     const lid = sp.rela_lid ? sp.rela_lid.split(',') : [];
                     invalid.push(...lid);
                 }
-                this.tree.loadFilter(invalid.join(','), 'access');
+                this.tree.loadFilter(invalid.join(','), 'filter');
             }
         }
         refreshChangeRela(price, samePrice) {
@@ -428,12 +425,16 @@ $(document).ready(() => {
             const data = { update: { id: price.id, rela_lid } };
             postData(window.location.pathname + '/update', data, function (result) {
                 revisePrice.loadUpdateData(result);
+                revisePrice.refreshTreeRela(price);
+                SpreadJsObj.refreshTreeRowVisible(priceBwSheet);
             });
         },
         updateRelaCid: function (price, rela_cid) {
             const data = { update: { id: price.id, rela_cid } };
             postData(window.location.pathname + '/update', data, function (result) {
                 revisePrice.loadUpdateData(result);
+                revisePrice.refreshChangeRela(price);
+                SpreadJsObj.reLoadSheetData(priceChangeSheet);
             });
         },
         selectionChanged: function () {