Browse Source

fix: 信息价空数据ai填值后操作bug

vian 8 months ago
parent
commit
98c5ed636f
1 changed files with 9 additions and 1 deletions
  1. 9 1
      web/maintain/price_info_lib/js/priceEmpty.js

+ 9 - 1
web/maintain/price_info_lib/js/priceEmpty.js

@@ -333,7 +333,6 @@ const EMPTY_BOOK = (() => {
   // ai填值
   const aiMatch = async () => {
     try {
-      debugger;
       // 获取信息价总表
       const priceInfoSummary = await ajaxPost('/priceInfoSummary/getData', {}, 1000 * 60 * 5);
       const summaryGroupMap = _.groupBy(priceInfoSummary, item => getFourCode(item.code));
@@ -400,6 +399,11 @@ const EMPTY_BOOK = (() => {
           };
           if (chunkItem && summaryItem) {
             workBookObj.sheet.setValue(chunkItem.row, classCodeCol, summaryItem.classCode);
+            cache[chunkItem.row].classCode = summaryItem.classCode;
+            const items = getItemsFromTableItem(cache[chunkItem.row]);
+            items.forEach(item => {
+              item.classCode = summaryItem.classCode;
+            });
             // 如果实际行存在珠海地区的,才填计算式
             const tableItems = getItemsFromTableItem(cache[chunkItem.row]);
             const needExpString = tableItems.some(tItem => {
@@ -408,6 +412,10 @@ const EMPTY_BOOK = (() => {
             });
             if (needExpString) {
               workBookObj.sheet.setValue(chunkItem.row, expStringCol, summaryItem.expString);
+              cache[chunkItem.row].expString = summaryItem.expString;
+              items.forEach(item => {
+                item.expString = summaryItem.expString;
+              });
             }
           }
         });