|
@@ -5152,25 +5152,29 @@ $(document).ready(() => {
|
|
|
});
|
|
});
|
|
|
$('#change-att-btn').val('');
|
|
$('#change-att-btn').val('');
|
|
|
} else if (content === 'del') {
|
|
} else if (content === 'del') {
|
|
|
- const data = {id: fid};
|
|
|
|
|
- postData('/tender/' + tender.id + '/measure/stage/' + stage.order + '/delete/file', data, function (result) {
|
|
|
|
|
- // 删除到attData中
|
|
|
|
|
- const att_index = attData.findIndex(function (item) {
|
|
|
|
|
- return item.id === parseInt(fid);
|
|
|
|
|
- });
|
|
|
|
|
- attData.splice(att_index, 1);
|
|
|
|
|
- // 重新生成List
|
|
|
|
|
|
|
+ const att = attData.find(function (item) { return item.id === parseInt(fid); });
|
|
|
|
|
+ deleteAfterHint(function () {
|
|
|
|
|
+ const data = {id: fid};
|
|
|
|
|
+ postData('/tender/' + tender.id + '/measure/stage/' + stage.order + '/delete/file', data, function (result) {
|
|
|
|
|
+ // 删除到attData中
|
|
|
|
|
+ const att_index = attData.findIndex(function (item) {
|
|
|
|
|
+ return item.id === parseInt(fid);
|
|
|
|
|
+ });
|
|
|
|
|
+ attData.splice(att_index, 1);
|
|
|
|
|
+ // 重新生成List
|
|
|
|
|
|
|
|
- if ($('#alllist-table tr').length === 1) {
|
|
|
|
|
- getAllList(parseInt($('#currentPage').text()) - 1);
|
|
|
|
|
|
|
+ if ($('#alllist-table tr').length === 1) {
|
|
|
|
|
+ getAllList(parseInt($('#currentPage').text()) - 1);
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ getAllList(parseInt($('#currentPage').text()));
|
|
|
|
|
+ }
|
|
|
|
|
+ getNodeList(node.id);
|
|
|
|
|
+ $('#showAttachment').hide();
|
|
|
|
|
+ $('#showAttachment').attr('file-id', '');
|
|
|
|
|
+ });
|
|
|
|
|
+ }, `确认删除附件「${att.filename}」?`);
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
- getAllList(parseInt($('#currentPage').text()));
|
|
|
|
|
- }
|
|
|
|
|
- getNodeList(node.id);
|
|
|
|
|
- $('#showAttachment').hide();
|
|
|
|
|
- $('#showAttachment').attr('file-id', '');
|
|
|
|
|
- });
|
|
|
|
|
} else if (content === 'view') {
|
|
} else if (content === 'view') {
|
|
|
const data = {id: fid};
|
|
const data = {id: fid};
|
|
|
postData('/tender/' + tender.id + '/measure/stage/' + stage.order + '/check/file', data, function (result) {
|
|
postData('/tender/' + tender.id + '/measure/stage/' + stage.order + '/check/file', data, function (result) {
|