Bläddra i källkod

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

MaiXinRong 4 år sedan
förälder
incheckning
3bc6b99439
1 ändrade filer med 8 tillägg och 4 borttagningar
  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('没有可应用的清单。');
+                                }
                             }
                         }
                     }