MaiXinRong преди 4 години
родител
ревизия
9d060a6264
променени са 1 файла, в които са добавени 10 реда и са изтрити 3 реда
  1. 10 3
      app/public/report/js/rpt_custom.js

+ 10 - 3
app/public/report/js/rpt_custom.js

@@ -432,9 +432,16 @@ const rptCustomObj = (function () {
                 return;
             }
         }
-        if (data[sGatherSelect].tenders.length <= specCol.length) {
-            hintObj.html('请至少选择1个普通汇总项目').show();
-            return;
+        if (gsObj.setting.onlySpec) {
+            if (data[sGatherSelect].tenders.length > specCol.length) {
+                hintObj.html('请勿选择普通汇总项目').show();
+                return;
+            }
+        } else {
+            if (data[sGatherSelect].tenders.length <= specCol.length) {
+                hintObj.html('请至少选择1个普通汇总项目').show();
+                return;
+            }
         }
         if (gsObj.setting.type === 'month') {
             data[sGatherSelect].month = $('#gather-month').val();