199 lines
9.4 KiB
Plaintext
199 lines
9.4 KiB
Plaintext
@{
|
|
ViewBag.Title = "批量客户报告发送";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@section CSS{
|
|
<style>
|
|
.btn {
|
|
min-width: 70px !important;
|
|
}
|
|
|
|
.btn-primary, .btn-primary:focus { /*background-color: #00b5f8 !important;*/
|
|
border-color: #fff;
|
|
}
|
|
|
|
.col-md-12 {
|
|
padding-left: 0;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
input[type=text] {
|
|
width: 280px;
|
|
}
|
|
|
|
.send-content, .send-content-item {
|
|
float: left;
|
|
}
|
|
|
|
.check-lable {
|
|
margin: 0 10px 0 50px;
|
|
}
|
|
</style>
|
|
}
|
|
@section JS{
|
|
<script type="text/javascript" src="/Scripts/ueditor/ueditor.config.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
<script type="text/javascript" src="/Scripts/ueditor/ueditor.all.min.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
<script type="text/javascript">
|
|
var vue = new Vue({
|
|
el: "#listdiv",
|
|
data: {
|
|
Model: { Title: "", Detail: "", ClientIds: "", HasTradeDetails: true, HasTradeMarketReport: true, TradeDetailsDateType: "当日", TradeMarketReportDateType: "当日" }
|
|
},
|
|
mounted: function () {
|
|
},
|
|
methods: {
|
|
sendEmail: function () {
|
|
|
|
var thisObj = this;
|
|
thisObj.Model.TradeMarketReportDateType = $("#TradeMarketReportDateType").val();
|
|
//thisObj.Model.Title = $("#title").val();
|
|
|
|
thisObj.Model.ClientIds = "@ViewBag.ClientIds";
|
|
thisObj.Model.StartDate = "@ViewBag.StartDate";
|
|
thisObj.Model.ValueDate = "@ViewBag.ValueDate";
|
|
|
|
thisObj.Model.HaveTrade = "@ViewBag.HaveTrade";
|
|
thisObj.Model.HavePosition = "@ViewBag.HavePosition";
|
|
thisObj.Model.HaveBanlance = "@ViewBag.HaveBanlance";
|
|
|
|
thisObj.Model.HasTradeDetails = $("#HasTradeDetails").prop("checked");
|
|
thisObj.Model.HasTradeMarketReport = $("#HasTradeMarketReport").prop("checked");
|
|
thisObj.Model.TradeDetailsDateType = $("#TradeDetailsDateType").val();
|
|
thisObj.Model.ClientBalanceDataType = $("#setClientBalanceType").val();
|
|
var detailTemplate = $("#setDetailTemplate").val();
|
|
var balanceTemplate = $("#setTemplate").val();
|
|
var detailReceiver = $("#CDContractor").val();
|
|
var balanceReceiver = $("#CBContractor").val();
|
|
if (thisObj.Model.HasTradeDetails || thisObj.Model.HasTradeMarketReport) {
|
|
main.post("/ClientPnlInfo/BatchSendClientRiskMonitor", { input: thisObj.Model, detailTemplate: detailTemplate, balanceTemplate: balanceTemplate, detailReceiver: detailReceiver, balanceReceiver: balanceReceiver }).done(
|
|
function (res) {
|
|
console.log(res.obj);
|
|
if (res.obj.resultMsg != "") {
|
|
main.alert(res.obj.resultMsg);
|
|
|
|
if (!res.obj.isSend) {
|
|
main.waitMe(close);
|
|
main.open("", "/common/ProgressBar?processName=ClientBalanceReport", { area: ['400px', '20px'], maxmin: false, closeBtn: 0, content: ["/common/ProgressBar?processName=ClientBalanceReport", "no"] });
|
|
}
|
|
|
|
} else {
|
|
main.waitMe(close);
|
|
main.open("", "/common/ProgressBar?processName=ClientBalanceReport", { area: ['400px', '20px'], maxmin: false, closeBtn: 0, content: ["/common/ProgressBar?processName=ClientBalanceReport", "no"] });
|
|
}
|
|
}
|
|
);
|
|
|
|
}
|
|
else {
|
|
main.message("请选择批量发送邮件附件类型");
|
|
return false;
|
|
}
|
|
},
|
|
batchDownload: function () {
|
|
var thisObj = this;
|
|
thisObj.Model.ClientIds = "@ViewBag.ClientIds";
|
|
thisObj.Model.StartDate = "@ViewBag.StartDate";
|
|
thisObj.Model.ValueDate = "@ViewBag.ValueDate";
|
|
|
|
thisObj.Model.HaveTrade = "@ViewBag.HaveTrade";
|
|
thisObj.Model.HavePosition = "@ViewBag.HavePosition";
|
|
thisObj.Model.HaveBanlance = "@ViewBag.HaveBanlance";
|
|
|
|
thisObj.Model.HasTradeDetails = $("#HasTradeDetails").prop("checked");
|
|
thisObj.Model.HasTradeMarketReport = $("#HasTradeMarketReport").prop("checked");
|
|
thisObj.Model.TradeDetailsDateType = $("#TradeDetailsDateType").val();
|
|
thisObj.Model.TradeMarketReportDateType = $("#TradeMarketReportDateType").val();
|
|
thisObj.Model.ClientBalanceDataType = $("#setClientBalanceType").val();
|
|
var detailTemplate = $("#setDetailTemplate").val();
|
|
var balanceTemplate = $("#setTemplate").val();
|
|
if (thisObj.Model.HasTradeDetails || thisObj.Model.HasTradeMarketReport) {
|
|
main.post("/ClientPnlInfo/BatchDownloadClientRiskMonitor", { input: thisObj.Model, balanceTemplate: balanceTemplate, detailTemplate: detailTemplate }).done(function (res) {
|
|
if (res.obj.resultMsg != "") {
|
|
main.alert(res.obj.resultMsg);
|
|
}
|
|
if (thisObj.Model.HasTradeDetails) {
|
|
window.open(res.obj.detailsZipFile);
|
|
}
|
|
if (thisObj.Model.HasTradeMarketReport) {
|
|
window.open(res.obj.marketZipFile);
|
|
}
|
|
});;
|
|
}
|
|
else {
|
|
main.message("请选择批量下载类型");
|
|
return false;
|
|
}
|
|
},
|
|
close: function () {
|
|
window.close();
|
|
}
|
|
}
|
|
})
|
|
|
|
function showMessage(mesg) {
|
|
if (mesg) {
|
|
main.alert(mesg);
|
|
}
|
|
else {
|
|
main.message("批量操作完成,进程已结束");
|
|
}
|
|
}
|
|
|
|
|
|
function toWildcard() {
|
|
main.open("结算报告通配符", "/Wildcard/ClientBalanceReportWildcard", { area: ['600px', '800px'] })
|
|
}
|
|
</script>
|
|
}
|
|
<div id="listdiv" class="yc-panel">
|
|
<div>
|
|
<span>发送对象:</span><span class="">结算日期:@ViewBag.StartDate-@ViewBag.ValueDate;预置条件:@ViewBag.PrewhereMode @ViewBag.ClientCount</span>
|
|
</div>
|
|
<div>
|
|
<h3>模板:</h3>
|
|
<div id="selectTemplate" style="display:grid">
|
|
<div id="clientBalanceTemplate" style="display:inline-flex">
|
|
<div id="clientBalance">
|
|
@Html.MyAceDropdownInput2("setTemplate", "结算报告模板: ", YLErp.Web.Controllers.clientbalanceController.GetAllClientBalanceTemplate(), false, "默认", true)
|
|
</div>
|
|
<div id="clientBalanceContractor" style="padding-left:30px">
|
|
@Html.MyAceDropdownInput("CBContractor", "结算报告联系人: ", ClientModelHelper.GetAllcontactype(true))
|
|
</div>
|
|
</div>
|
|
<div id="clientDetailTemplate" style="display:inline-flex">
|
|
<div id="clientDetail">
|
|
@Html.MyAceDropdownInput2("setDetailTemplate", "交易明细模板: ", YLErp.Web.Controllers.tradeController.GetAllTradeDetailTemplate(), false, "默认", true)
|
|
</div>
|
|
<div id="clientDetailContractor" style="padding-left:30px">
|
|
@Html.MyAceDropdownInput("CDContractor", "交易明细联系人: ", ClientModelHelper.GetAllcontactype(true))
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="setClientBalanceType" value="default">
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label style="margin-top: 20px">
|
|
<input type="checkbox" name="HasTradeDetails" checked id="HasTradeDetails"><span class="">1:交易明细</span>
|
|
<select id="TradeDetailsDateType">
|
|
@Html.Raw(GlobalData.GetOptions(new List<string>() { "结算日期", "当日","当月区间", "全部区间" }))
|
|
</select>
|
|
</label>
|
|
<label style="margin-top: 20px; margin-left: 60px;">
|
|
<input type="checkbox" name="HasTradeMarketReport" checked id="HasTradeMarketReport"><span class="">2:结算报告</span>
|
|
@if (PS.Config.Company != CompanyEnum.中金)
|
|
{
|
|
<select id="TradeMarketReportDateType">
|
|
@Html.Raw(GlobalData.GetOptions(new List<string>() { "结算日期", "当日","当月区间", "全部区间" }))
|
|
</select>
|
|
}
|
|
|
|
</label>
|
|
</div>
|
|
|
|
<div style="margin-top: 20px; float: left;">
|
|
<input class="btn btn-primary" type="button" value="发送" v-on:click="sendEmail()" />
|
|
<input class="btn btn-primary" type="button" value="下载" v-on:click="batchDownload()" />
|
|
<input class="btn btn-primary" type="button" value="取消" v-on:click="close()" />
|
|
</div>
|
|
|
|
</div> |