refactor(web): EQD-5320 清理不可达的互换日终估值导入死代码——#importEod弹窗div与showImport/importEodFile/importClose三函数整块删除:全库无任何按钮调用showImport()(弹窗不可达,业务无从使用),其内部/trs_hub_api/valuationEndOfDay/import直连反代为死代码且是全库最后一处可执行trs_hub_api依赖(剩余引用均为历史注释);bond-oms侧接口不动;如需恢复按BatchSendSettleEmail同款C#代理模式(注释留指引)
This commit is contained in:
@@ -109,20 +109,6 @@
|
||||
<input type="hidden" name="" value="" />
|
||||
</form>
|
||||
|
||||
<div id="importEod" style="display:none;">
|
||||
<form id="eodUploadForm" method="post" class="yc-panel" onsubmit="return false;" style="padding-bottom:30px;">
|
||||
<h4 class="mb-4">互换日终估值导入</h4>
|
||||
<div class="mb-4">
|
||||
<input type="file" id="openFile" name="file" accept=".xlsx" />
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<button type="button" class="btn btn-primary" onclick="importEodFile()">导入日终估值</button>
|
||||
<a href="/App_Docs/导入模板/互换日终估值导入模板.xlsx" class="btn btn-primary">导入模板下载</a>
|
||||
<button type="button" class="btn btn-primary" onclick="importClose()">关闭</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="exportTpl">
|
||||
<div style="padding:20px">
|
||||
<p><input class="btn btn-primary " type="button" onclick="previewTradeAbstract();return false;" value="交易简讯"></p>
|
||||
|
||||
@@ -523,38 +523,10 @@ function exportTrade() {
|
||||
var fileName = "互换交易导出" + dateTemp;
|
||||
main.toExcel("listGrid", fileName, "xls");
|
||||
}
|
||||
function showImport() {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title:"互换日终估值导入",
|
||||
area: ['60%', '60%'],
|
||||
fixed: false, //不固定
|
||||
maxmin: true,
|
||||
content: $("#importEod")
|
||||
});
|
||||
}
|
||||
function importEodFile() {
|
||||
let fileName = $("#openFile").val();
|
||||
if (!fileName) {
|
||||
return main.alert("请选择要导入的文件!");
|
||||
}
|
||||
let index = fileName.lastIndexOf(".");
|
||||
let fileEx = index > 0 ? fileName.substr(index).toLowerCase() : '';
|
||||
if (fileEx !== '.xlsx') {
|
||||
return main.alert("只能上传.xlsx类型的文件!");
|
||||
}
|
||||
function success(data) {
|
||||
if (data.success) {
|
||||
main.alert(!data.totalNum ? '导入成功!' : "共 {0} 条数据,导入成功 {1} 条数据!".template(data.totalNum, data.successNum));
|
||||
} else {
|
||||
main.alert("导入失败:" + data.message);
|
||||
}
|
||||
}
|
||||
var url = "/trs_hub_api/valuationEndOfDay/import";
|
||||
main.confirm("确定导入?", UploadFile.bind(null, { inputId: 'openFile', url: url, success: success }));
|
||||
}
|
||||
function importClose() {
|
||||
layer.closeAll();
|
||||
}
|
||||
|
||||
// EQD-5320 清理:原"互换日终估值导入"弹窗与 importEodFile/showImport/importClose 已删除——
|
||||
// 页面从未有入口按钮调用 showImport()(弹窗不可达),其内部 /trs_hub_api/valuationEndOfDay/import
|
||||
// 直连反向代理的调用属死代码,也是全库最后一处 /trs_hub_api 依赖。如需恢复该功能,
|
||||
// 按 BatchSendSettleEmail 同款模式走 C# 服务端代理(multipart 转发),勿再直连反代。
|
||||
|
||||
window.reloadData = reloadtrade;
|
||||
Reference in New Issue
Block a user