|
@@ -328,6 +328,7 @@ $(document).ready(() => {
|
|
|
selector: '#bills-tag',
|
|
|
relaSpread: slSpread,
|
|
|
updateUrl: window.location.pathname + '/tag',
|
|
|
+ readOnly: true,
|
|
|
afterModify: function (nodes) {
|
|
|
SpreadJsObj.repaintNodesRowHeader(slSpread.getActiveSheet(), nodes);
|
|
|
},
|
|
@@ -844,7 +845,7 @@ $(document).ready(() => {
|
|
|
const curIndex = parseInt($('#im-locate-info')[0].innerText.split('/')[0]);
|
|
|
const select = SpreadJsObj.getSelectObject(self.spread.getActiveSheet());
|
|
|
if (select && select.source) {
|
|
|
- const targetIndex = math.max(curIndex-1, 1);
|
|
|
+ const targetIndex = Math.max(curIndex-1, 1);
|
|
|
SpreadJsObj.locateTreeNode(slSpread.getActiveSheet(), select.source[targetIndex-1].id, true);
|
|
|
stagePosSpreadObj.loadCurPosData();
|
|
|
$('#im-locate-info')[0].innerText = targetIndex + '/' + select.source.length;
|
|
@@ -854,7 +855,7 @@ $(document).ready(() => {
|
|
|
const curIndex = parseInt($('#im-locate-info')[0].innerText.split('/')[0]);
|
|
|
const select = SpreadJsObj.getSelectObject(self.spread.getActiveSheet());
|
|
|
if (select && select.source) {
|
|
|
- const targetIndex = math.min(curIndex+1, select.source.length);
|
|
|
+ const targetIndex = Math.min(curIndex+1, select.source.length);
|
|
|
SpreadJsObj.locateTreeNode(slSpread.getActiveSheet(), select.source[targetIndex-1].id, true);
|
|
|
stagePosSpreadObj.loadCurPosData();
|
|
|
$('#im-locate-info')[0].innerText = targetIndex + '/' + select.source.length;
|
|
@@ -1135,7 +1136,7 @@ $(document).ready(() => {
|
|
|
// 批量下载
|
|
|
$('#bach-download').click(function() {
|
|
|
const fileIds = [];
|
|
|
- const type = $(this).prop('type');
|
|
|
+ const type = $(this).attr('type');
|
|
|
let node = ''
|
|
|
if (type === 'curr') {
|
|
|
node = '#nodelist-table .check-file:checked'
|
|
@@ -1148,9 +1149,25 @@ $(document).ready(() => {
|
|
|
});
|
|
|
|
|
|
if (fileIds.length) {
|
|
|
- const url = `/tender/${relaTender.id}/measure/stage/${relaStage.order}/download/compresse-file?fileIds=${JSON.stringify(fileIds)}`;
|
|
|
- $('#zipDown').attr('href', url);
|
|
|
- $("#zipDown")[0].click();
|
|
|
+ if (fileIds.length > 10) {
|
|
|
+ return toastr.warning(`最大允许10个文件(当前${fileIds.length}个)`)
|
|
|
+ }
|
|
|
+ toastr.success('正在进行压缩文件...', '', { timeOut: 0, extendedTimeOut: 0})
|
|
|
+ $(this).attr('disabled', "true")
|
|
|
+ const btn = $(this)
|
|
|
+ postCompressFile(`/tender/${relaTender.id}/measure/stage/${relaStage.order}/download/compresse-file`, {fileIds}, function(result) {
|
|
|
+ toastr.clear()
|
|
|
+ toastr.success('压缩文件成功')
|
|
|
+ btn.removeAttr('disabled')
|
|
|
+ const href = window.URL.createObjectURL(result)
|
|
|
+ $('#zipDown').attr('href', href);
|
|
|
+ $('#zipDown').attr('download', `${relaTender.name}-计量台账-第${relaStage.order}期-附件.zip`);
|
|
|
+ $("#zipDown")[0].click();
|
|
|
+ }, () => {
|
|
|
+ btn.removeAttr('disabled')
|
|
|
+ toastr.clear()
|
|
|
+ toastr.error('批量下载失败')
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|