Explorar o código

Bug #2931 签约清单,应用全部清单单价至台账问题

MaiXinRong %!s(int64=4) %!d(string=hai) anos
pai
achega
3bc6b99439
Modificáronse 1 ficheiros con 8 adicións e 4 borrados
  1. 8 4
      app/public/js/ledger.js

+ 8 - 4
app/public/js/ledger.js

@@ -2333,10 +2333,14 @@ $(document).ready(function() {
                                         datas.push(data);
                                     }
                                 }
-                                postData(window.location.pathname + '/update', {postType: 'update', postData: datas}, function (result) {
-                                    const refreshNode = ledgerTree.loadPostData(result);
-                                    treeOperationObj.refreshTree(ledgerSpread.getActiveSheet(), refreshNode);
-                                });
+                                if (datas.length > 0) {
+                                    postData(window.location.pathname + '/update', {postType: 'update', postData: datas}, function (result) {
+                                        const refreshNode = ledgerTree.loadPostData(result);
+                                        treeOperationObj.refreshTree(ledgerSpread.getActiveSheet(), refreshNode);
+                                    });
+                                } else {
+                                    toastr.warning('没有可应用的清单。');
+                                }
                             }
                         }
                     }