Browse Source

单价调整,右键菜单后表格底色问题

MaiXinRong 2 years ago
parent
commit
d915eb7749
1 changed files with 4 additions and 3 deletions
  1. 4 3
      app/public/js/revise_price.js

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

@@ -80,12 +80,13 @@ $(document).ready(() => {
         font: '12px 微软雅黑',
         readOnly,
         getColor: function (sheet, data, row, col, defaultColor) {
-            if (!data || (data.rela_lid && data.rela_cid)) return '#f5deb3';
+            if (!data) return defaultColor;
+            if (data.rela_lid && data.rela_cid) return '#f5deb3';
 
             const samePrice = sheet.zh_data.find(x => {
-                return x.b_code === data.b_code && x.name === data.name && x.unit === data.unit && x.org_price === data.org_price;
+                return x.b_code === data.b_code && x.name === data.name && x.unit === data.unit && x.org_price === data.org_price && data.id !== x.id;
             });
-            return samePrice ? defaultColor : '#f5deb3';
+            return !samePrice ? defaultColor : '#f5deb3';
         }
     };
     const priceBwSpreadSetting = {