|
@@ -636,9 +636,10 @@ $(document).ready(function() {
|
|
|
const html = [];
|
|
|
const downHtml = `<a href="javascript: void(0);" onclick="AliOss.downloadFile('${file.filepath}', '${file.filename + file.fileext}')" class="mr-1"><i class="fa fa-download fa-fw"></i></a>`;
|
|
|
const delHtml = file.uid === userID ? `<a href="javascript: void(0);" class="mr-1 text-danger" name="del-file" file_id="${file.id}"><i class="fa fa-trash-o fa-fw"></i></a>` : '';
|
|
|
+ const locateHtml = `<a href="javascript: void(0);" name="locate-bills" file_id="${file.id}" class="mr-1"><i data-toggle="tooltip" data-placement="left" data-original-title="定位" class="fa fa-crosshairs"></i></a>`;
|
|
|
html.push('<tr>');
|
|
|
html.push(`<td><input type="checkbox" name="check-att" file_id="${file.id}"></td>`);
|
|
|
- html.push(`<td><div class="d-flex justify-content-between align-items-center table-file"><a href="javascript: void(0);" file_id="${file.id}" name="view-file">${file.filename}${file.fileext}</a><div class="btn-group-table" style="display: none;">${downHtml}${delHtml}</div></div></td>`);
|
|
|
+ html.push(`<td><div class="d-flex justify-content-between align-items-center table-file"><a href="javascript: void(0);" file_id="${file.id}" name="view-file">${file.filename}${file.fileext}</a><div class="btn-group-table" style="display: none;">${locateHtml}${downHtml}${delHtml}</div></div></td>`);
|
|
|
html.push(`<td>${file.u_name}</td>`);
|
|
|
html.push('</tr>');
|
|
|
return html.join('');
|
|
@@ -760,6 +761,13 @@ $(document).ready(function() {
|
|
|
attObj.refreshTable();
|
|
|
})
|
|
|
}
|
|
|
+ locateBills(file_id) {
|
|
|
+ const file = this.atts.find(x => { return x.id === file_id; });
|
|
|
+ if (!file || !file.safe_id) return;
|
|
|
+
|
|
|
+ const safeBills = billsObj.tree.nodes.find(x => { return x.safe_id === file.safe_id; });
|
|
|
+ SpreadJsObj.locateTreeNode(billsObj.sheet, safeBills.tree_id, true);
|
|
|
+ }
|
|
|
setTab(tab) {
|
|
|
this.activeTab = tab;
|
|
|
this.refreshShowPage();
|
|
@@ -801,6 +809,9 @@ $(document).ready(function() {
|
|
|
AliOss.downloadFile(file.filepath, `${file.filename}${file.fileext}`)
|
|
|
}
|
|
|
});
|
|
|
+ $('body').on('click', 'a[name=locate-bills]', function() {
|
|
|
+ attObj.locateBills(parseInt(this.getAttribute('file_id')));
|
|
|
+ });
|
|
|
$('.page-select').click(function() {
|
|
|
const content = this.getAttribute('content');
|
|
|
if (content === 'pre') {
|