Browse Source

fix: 空表里删除计算式报错

vian 1 năm trước cách đây
mục cha
commit
e221c2dd51
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      web/maintain/price_info_lib/js/priceEmpty.js

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

@@ -136,8 +136,9 @@ const EMPTY_BOOK = (() => {
                 // 只有珠海才更新计算式
                 const updateObj = { ...diffData };
                 const area = AREA_BOOK.cache.find(areaItem => areaItem.ID === item.areaID);
-                if (!area || !area.name || !/珠海/.test(area.name)) {
+                if (diffMap && (!area || !area.name || !/珠海/.test(area.name))) {
                   delete updateObj.expString;
+                  delete diffData.expString;
                 }
                 postData.push({ type: UpdateType.UPDATE, ID: item.ID, areaID: area.ID, compilationID, period: curLibPeriod, data: updateObj });
               });