|
@@ -116,7 +116,7 @@ $(document).ready(function() {
|
|
|
if (!filingObj.curFiling) return;
|
|
|
|
|
|
filingObj.curTotalPage = Math.ceil(filingObj.curFiling.source_node.file_count / this.pageCount);
|
|
|
- filingObj.curPage = Math.min(filingObj.curTotalPage, filingObj.curPage);
|
|
|
+ filingObj.curPage = Math.min(filingObj.curTotalPage, Math.max(filingObj.curPage, 1));
|
|
|
$('#curPage').html(filingObj.curPage);
|
|
|
$('#curTotalPage').html(filingObj.curTotalPage);
|
|
|
if (filingObj.curTotalPage > 1) {
|
|
@@ -199,7 +199,7 @@ $(document).ready(function() {
|
|
|
filingObj.filingTree.updateNode(filing);
|
|
|
let parent = filing.getParentNode();
|
|
|
while (!!parent) {
|
|
|
- parent.source_node.total_file_count = parent.source_node.total_file_count + differ;
|
|
|
+ parent.source_node.total_file_count = parent.source_node.total_file_count ? parent.source_node.total_file_count + differ : differ;
|
|
|
parent.name = parent.source_node.name + (parent.source_node.total_file_count > 0 ? `(${parent.source_node.total_file_count})` : '');
|
|
|
filingObj.filingTree.updateNode(parent);
|
|
|
parent = parent.getParentNode();
|
|
@@ -228,8 +228,8 @@ $(document).ready(function() {
|
|
|
postDataWithFile('file/upload', formData, function (data) {
|
|
|
filingObj.curFiling.source_node.files.unshift(...data.files);
|
|
|
filingObj.updateFilingFileCount(filingObj.curFiling, data.filing.file_count);
|
|
|
- filingObj.refreshFilesTable();
|
|
|
filingObj.refreshPages();
|
|
|
+ filingObj.refreshFilesTable();
|
|
|
if (callback) callback();
|
|
|
});
|
|
|
}
|
|
@@ -248,8 +248,8 @@ $(document).ready(function() {
|
|
|
function(result) {
|
|
|
filingObj.curFiling.source_node.files.unshift(...result.files);
|
|
|
filingObj.updateFilingFileCount(filingObj.curFiling, result.filing.file_count);
|
|
|
- filingObj.refreshFilesTable();
|
|
|
filingObj.refreshPages();
|
|
|
+ filingObj.refreshFilesTable();
|
|
|
if (callback) callback();
|
|
|
});
|
|
|
|
|
@@ -999,7 +999,7 @@ $(document).ready(function() {
|
|
|
selectFiling.each((i, x) => { selectFilingId.push(x.value); });
|
|
|
self.syncFiling(self.curFiling, selectFilingId);
|
|
|
toastr.success('同步成功');
|
|
|
- $('[name=cbft]').each((i, x) => { x.checked = false; });
|
|
|
+ $('[name=cbft]').removeAttr('checked');
|
|
|
$('#filing-select-all')[0].checked = false;
|
|
|
});
|
|
|
$('#batch-del-filing').click(() => {
|