소스 검색

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

MaiXinRong 2 년 전
부모
커밋
d915eb7749
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  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 微软雅黑',
         font: '12px 微软雅黑',
         readOnly,
         readOnly,
         getColor: function (sheet, data, row, col, defaultColor) {
         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 => {
             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 = {
     const priceBwSpreadSetting = {