瀏覽代碼

单价调整,不应用

MaiXinRong 2 年之前
父節點
當前提交
0721eeb8da
共有 1 個文件被更改,包括 33 次插入2 次删除
  1. 33 2
      app/public/js/revise_price.js

+ 33 - 2
app/public/js/revise_price.js

@@ -514,7 +514,7 @@ $(document).ready(() => {
                 sprMove: '----',
                 chooseRelaBw: {
                     name: '选择应用部位',
-                    icon: 'fa-tags',
+                    icon: 'fa-link',
                     callback: function (key, opt) {
                         const price = SpreadJsObj.getSelectObject(priceSheet);
                         const samePrice = revisePrice.getSamePrice(price);
@@ -528,9 +528,24 @@ $(document).ready(() => {
                         return !readOnly;
                     }
                 },
+                noRelaBw: {
+                    name: '不应用于任何部位',
+                    icon: 'fa-unlink',
+                    callback: function (key, opt) {
+                        const price = SpreadJsObj.getSelectObject(priceSheet);
+                        priceOprObj.updateRelaLid(price, '-1');
+                    },
+                    disabled: function (key, opt) {
+                        const node = SpreadJsObj.getSelectObject(priceSheet);
+                        return !node;
+                    },
+                    visible: function (key, opt) {
+                        return !readOnly;
+                    }
+                },
                 chooseRelaChange: {
                     name: '选择应用变更令',
-                    icon: 'fa-tags',
+                    icon: 'fa-link',
                     callback: function (key, opt) {
                         const price = SpreadJsObj.getSelectObject(priceSheet);
                         const samePrice = revisePrice.getSamePrice(price);
@@ -544,6 +559,21 @@ $(document).ready(() => {
                         return !readOnly;
                     }
                 },
+                noRelaChange: {
+                    name: '不应用于变更令',
+                    icon: 'fa-unlink',
+                    callback: function (key, opt) {
+                        const price = SpreadJsObj.getSelectObject(priceSheet);
+                        priceOprObj.updateRelaCid(price, '-1');
+                    },
+                    disabled: function (key, opt) {
+                        const node = SpreadJsObj.getSelectObject(priceSheet);
+                        return !node;
+                    },
+                    visible: function (key, opt) {
+                        return !readOnly;
+                    }
+                },
             },
         });
     }
@@ -951,6 +981,7 @@ $(document).ready(() => {
                     c.visible = !!exist;
                 }
             }
+            if (this.sheet) SpreadJsObj.refreshTreeRowVisible(this.sheet);
             $('#choose-rela-change').modal('show');
         }
     }