Merge branch 'feature/zs_v1.3_0822' into feature/zs_v1.3_risk
This commit is contained in:
@@ -192,8 +192,19 @@ namespace YLErp.Cache
|
||||
/// <param name="keys"></param>
|
||||
public bool BatchDelete(string pattern)
|
||||
{
|
||||
var keys = QueryKeys(pattern);
|
||||
return db.KeyDelete(keys.ToArray())>0;
|
||||
var endpoints = _redisConnector.GetEndPoints(); // 获取所有节点
|
||||
var patterns = GenerateKey(pattern);
|
||||
foreach (var endpoint in endpoints)
|
||||
{
|
||||
var server = _redisConnector.GetServer(endpoint);
|
||||
var keys = server.Keys(pattern: patterns);
|
||||
// 逐键删除(规避跨槽位)
|
||||
foreach (var key in keys)
|
||||
{
|
||||
db.KeyDelete(key);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using YLErp.Commons;
|
||||
using YLErp.Helpers;
|
||||
|
||||
@@ -205,6 +205,20 @@ namespace YLErp.DBModels
|
||||
/// </summary>
|
||||
[DisplayName("账户类型")]
|
||||
public string cash_type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 转出科目
|
||||
/// </summary>
|
||||
[DisplayName("转出科目")]
|
||||
[Column("transfer_out_account")]
|
||||
public string TransferOutAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 转入科目
|
||||
/// </summary>
|
||||
[DisplayName("转入科目")]
|
||||
[Column("transfer_in_account")]
|
||||
public string TransferInAccount { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 出入金信息
|
||||
@@ -267,7 +281,7 @@ namespace YLErp.DBModels
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Direction == "出金" || Direction == "入金" || Direction == "其他收入" || Direction == "其他支出" || Direction == "应收预付金" || Direction == "实收预付金" || Direction == "实付预付金" || Direction == "实收权利金" || Direction == "实付权利金")
|
||||
if (Direction == "出金" || Direction == "入金" || Direction == "其他收入" || Direction == "其他支出" || Direction == "应收预付金" || Direction == "实收预付金" || Direction == "实付预付金" || Direction == "实收权利金" || Direction == "实付权利金" || Direction == "划转")
|
||||
{
|
||||
return Direction;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using RestSharp;
|
||||
using RestSharp;
|
||||
using RestSharp.Authenticators;
|
||||
using RestSharp.Authenticators.OAuth2;
|
||||
using System;
|
||||
@@ -95,7 +95,6 @@ namespace YLErp.Helpers
|
||||
// 发送请求并获取响应结果
|
||||
var response = await client.ExecuteAsync<ReponseWrap<TResponse>>(request);
|
||||
var responseContent = response.Content;
|
||||
|
||||
return Newtonsoft.Json.JsonConvert.DeserializeObject<TResponse>(responseContent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace YLErp
|
||||
setEnvironment(new[] { "KafkaConfig" }, "_");
|
||||
setEnvironment(new[] { "BondOmsInterface" }, "_");
|
||||
setEnvironment(new[] { "OrcaleDatabaseConfig" }, "_");
|
||||
Environment.SetEnvironmentVariable("MaxThreadPercent", configuration["MaxThreadPercent"]);
|
||||
Environment.SetEnvironmentVariable("Reg_Report_Url", configuration["Reg_Report_Url"]);
|
||||
//用于必须引入程序集System.Numerics.Vectors
|
||||
_ = System.Numerics.Vector<double>.Zero;
|
||||
|
||||
|
||||
@@ -230,7 +230,6 @@ namespace YLErp.BLL.Eod
|
||||
//SetDebugSqlLog();
|
||||
Dictionary<int, DateTime?> dicIntradayTradePosition = DbContext.intraday_trade_position.Where(x => clientIds.Contains(x.ClientId)).AsEnumerable().GroupBy(p => p.ClientId).Select(p => new { p.Key, OptDate = p.Max(d => d.OptDate) })
|
||||
.ToDictionary(p => p.Key, p => p.OptDate);
|
||||
|
||||
Dictionary<int, DateTime?> dicCashInOut = DbContext.ClientCashInCashOut.Where(x => clientIds.Contains((int)x.ClientId)).AsEnumerable().GroupBy(p => (int)p.ClientId).Select(p => new { p.Key, OptDate = p.Max(d => d.OptDate) }).ToDictionary(p => p.Key, p => p.OptDate);
|
||||
foreach (var item in _clientBalanceDic.Values)
|
||||
{
|
||||
@@ -256,7 +255,7 @@ namespace YLErp.BLL.Eod
|
||||
item.LastDayRemainFundWithProduct = item.LastDayRemainFund + item.LastGuaranteesTotalAmount;
|
||||
|
||||
//当前账号资金
|
||||
item.AmountFund = item.AmountFund + item.NetFund + item.OtherFund + item.OptionPremium + item.OptionPremiumSwap + item.SwapBalance + item.SettlementBalance+ item.VmInFund-item.VmOutFund;
|
||||
item.AmountFund = item.AmountFund + item.NetFund + item.OtherFund + item.VmInFund-item.VmOutFund+item.WinLoss;
|
||||
|
||||
item.WinLoss += item.WinLoss2;
|
||||
|
||||
@@ -268,7 +267,7 @@ namespace YLErp.BLL.Eod
|
||||
//预付金金额=期末结存-初始预付金金额
|
||||
item.MarginBalance = item.AmountFund - item.MySideMargin;
|
||||
// 可用资金 = 期末结存 - 追保账户余额 - 初始保证金
|
||||
item.AvailableAmount = item.MarginBalance - (item.VmInFundSum - item.VmOutFundSum) - item.FrozenMarginMoney;
|
||||
item.AvailableAmount = item.MarginBalance - item.FrozenMarginMoney;
|
||||
// 是否追保=盯市金额小于维持保证金额
|
||||
item.NeedAddMargin = item.SwapMarketAmount < item.MaintenanceMargin;
|
||||
// 追保金额=初始保证金金额-盯市金额
|
||||
@@ -1065,7 +1064,7 @@ namespace YLErp.BLL.Eod
|
||||
from td in trade.DefaultIfEmpty()
|
||||
where t.HappenDate >= lastSettletDateAddOne && t.HappenDate < newValuedate
|
||||
&& t.ValidState != "InValid"
|
||||
&& (t.State == ClientCashInCashOut.已结算 || t.State == ClientCashInCashOut.已确认 || (t.Direction == "出金" && ClientCashInCashOut.outCashCals.Contains(t.State)))
|
||||
&& (t.State == ClientCashInCashOut.已结算 || t.State == ClientCashInCashOut.已确认 || ((t.Direction == "出金"||t.Direction=="划转") && ClientCashInCashOut.outCashCals.Contains(t.State)))
|
||||
&& clientIds.Contains(t.ClientId.Value)
|
||||
&& t.Money != null
|
||||
&& td.TradeType != "收益互换"
|
||||
@@ -1075,19 +1074,23 @@ namespace YLErp.BLL.Eod
|
||||
TradeId = t.TradeId ?? 0,
|
||||
action = t.Direction + "^" + (t.Direction == "应收" ? t.Action : ""),
|
||||
money = t.Money.Value,
|
||||
cash_type = t.cash_type
|
||||
cash_type = t.cash_type,
|
||||
TransferOutAccount=t.TransferOutAccount,
|
||||
TransferInAccount = t.TransferInAccount
|
||||
};
|
||||
|
||||
//获取包含的所有收益互换id列表
|
||||
var allTradeIds = ClientCashQuery.Select(x => x.TradeId).ToList();
|
||||
|
||||
var ClientCashQuerySum = from t in ClientCashQuery
|
||||
group t by new { t.ClientId, t.action, t.cash_type } into g
|
||||
group t by new { t.ClientId, t.action, t.cash_type,t.TransferOutAccount,t.TransferInAccount } into g
|
||||
select new
|
||||
{
|
||||
g.Key.ClientId,
|
||||
g.Key.action,
|
||||
g.Key.cash_type,
|
||||
g.Key.TransferOutAccount,
|
||||
g.Key.TransferInAccount,
|
||||
moneySum = g.Sum(n => n.money),
|
||||
swapMoneySun = 0.0
|
||||
};
|
||||
@@ -1150,6 +1153,45 @@ namespace YLErp.BLL.Eod
|
||||
{
|
||||
balance.OutFundOther = data.moneySum;
|
||||
}
|
||||
else if (data.action == "划转^")
|
||||
{
|
||||
if (data.TransferOutAccount == "初保账户")
|
||||
{
|
||||
balance.InFund -= data.moneySum;
|
||||
if (data.TransferInAccount == "追保账户")
|
||||
{
|
||||
balance.VmInFund += data.moneySum;
|
||||
}
|
||||
else
|
||||
{
|
||||
balance.WinLoss += data.moneySum;
|
||||
}
|
||||
}
|
||||
else if (data.TransferOutAccount == "追保账户")
|
||||
{
|
||||
balance.VmInFund -= data.moneySum;
|
||||
if (data.TransferInAccount == "初保账户")
|
||||
{
|
||||
balance.InFund += data.moneySum;
|
||||
}
|
||||
else
|
||||
{
|
||||
balance.WinLoss += data.moneySum;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
balance.WinLoss -= data.moneySum;
|
||||
if (data.TransferInAccount == "初保账户")
|
||||
{
|
||||
balance.InFund += data.moneySum;
|
||||
}
|
||||
else
|
||||
{
|
||||
balance.VmInFund += data.moneySum;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace BaseOUDAL
|
||||
get
|
||||
{
|
||||
if (State == 0) return "正常";
|
||||
if (State == 2) return "已注销";
|
||||
return "禁用";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
|
||||
namespace YLErp.Modules.ApiModule
|
||||
{
|
||||
@@ -83,7 +84,7 @@ namespace YLErp.Modules.ApiModule
|
||||
public string PostJson(string apiPath, object postData, Action<HttpRequestMessage> requestHandle)
|
||||
{
|
||||
var str = JsonHelper.Serialize(postData) ?? string.Empty;
|
||||
using (var content = new StringContent(str))
|
||||
using (var content = new StringContent(str, Encoding.UTF8, "application/json"))
|
||||
using (var request = new HttpRequestMessage()
|
||||
{
|
||||
Method = HttpMethod.Post,
|
||||
@@ -93,7 +94,7 @@ namespace YLErp.Modules.ApiModule
|
||||
{
|
||||
request.Headers.Add("Accept-Encoding", "gzip");
|
||||
requestHandle?.Invoke(request);
|
||||
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
|
||||
// content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
|
||||
LogFactory.GetLogger<HttpClientWrap>().Info($"url:{apiPath}\r\npostData:{str}\r\n{content.ToJson()}");
|
||||
try
|
||||
{
|
||||
|
||||
@@ -602,6 +602,8 @@ namespace YLErp.Modules.ClientModule
|
||||
r.CurrencyCode = req.CurrencyCode;
|
||||
r.cash_type = req.cash_type;
|
||||
r.ValidState = ConsGlobal.Valid;
|
||||
r.TransferOutAccount = req.TransferOutAccount;
|
||||
r.TransferInAccount = req.TransferInAccount;
|
||||
}
|
||||
|
||||
if (isARAP)
|
||||
@@ -696,7 +698,34 @@ namespace YLErp.Modules.ClientModule
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 划转资金时进行验资
|
||||
if ("划转".Equals(r.Direction))
|
||||
{
|
||||
var clientbalance = ClientBalanceUtility.GetClientBanlances(new List<int> { r.ClientId.Value }, DateTime.MinValue, DateTime.Now.Date).FirstOrDefault();
|
||||
if (clientbalance == null)
|
||||
{
|
||||
throw new ServiceException("查询客户资金信息失败");
|
||||
}
|
||||
var money = r.Money ?? 0;
|
||||
money=isAddNew? money: money-(originalMoney??0);
|
||||
var netFundAll = Math.Round(clientbalance.NetFundAll,2,MidpointRounding.AwayFromZero);
|
||||
var vmFundSum = Math.Round(clientbalance.VmFundSum,2,MidpointRounding.AwayFromZero);
|
||||
var winLoss = Math.Round(clientbalance.WinLoss,2,MidpointRounding.AwayFromZero);
|
||||
if (r.TransferOutAccount == "初保账户" && money > netFundAll)
|
||||
{
|
||||
throw new ServiceException("划转金额不能超过初保账户金额");
|
||||
}
|
||||
if (r.TransferOutAccount == "追保账户" && money > vmFundSum)
|
||||
{
|
||||
throw new ServiceException("划转金额不能超过追保账户金额");
|
||||
}
|
||||
if (r.TransferOutAccount == "已实现盈亏" && money > winLoss)
|
||||
{
|
||||
throw new ServiceException("划转金额不能超过已实现盈亏");
|
||||
}
|
||||
r.cash_type = null;
|
||||
}
|
||||
#endregion
|
||||
if (r.Direction != "出金" && r.Direction != "入金")
|
||||
{
|
||||
r.OpenBank = null;
|
||||
|
||||
@@ -18,8 +18,9 @@ namespace YLErp.BLL
|
||||
/// 系统中可以操作的方向
|
||||
/// </summary>
|
||||
public static List<string> EntryDirection_Remove = new List<string> { "收入", "支出" };
|
||||
public static List<string> EntryDirection_Menu = new List<string> { "出金", "入金", "其他收入", "其他支出" };
|
||||
public static List<string> DirectionType = new List<string> { "出金", "入金", "权利金支出", "权利金收入", "平仓/行权支出", "平仓/行权收入", "票息支出", "票息收入", "其他支出", "其他收入", "互换收入", "互换支出","应付预付金","预付金返息" };
|
||||
public static List<string> EntryDirection_Menu = new List<string> { "出金", "入金", "其他收入", "其他支出","划转" };
|
||||
public static List<string> TransferAccount = new List<string> { "初保账户", "追保账户", "已实现盈亏" };
|
||||
public static List<string> DirectionType = new List<string> { "出金", "入金", "划转", "权利金支出", "权利金收入", "平仓/行权支出", "平仓/行权收入", "票息支出", "票息收入", "其他支出", "其他收入", "互换收入", "互换支出","应付预付金","预付金返息" };
|
||||
/// <summary>
|
||||
/// 现金交易方向
|
||||
/// </summary>
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
}
|
||||
}
|
||||
|
||||
public string GetStr(string key, string template = "默认")
|
||||
public string GetStr(string key, string template = "默认")
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateObj(string key, string value, string template = "默认")
|
||||
public void UpdateObj(string key, string value, string template = "默认")
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
@@ -121,7 +121,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
/// <typeparam name="T">Type</typeparam>
|
||||
/// <param name="key">The key of the value to get.</param>
|
||||
/// <returns>The value associated with the specified key.</returns>
|
||||
public virtual T Get<T>(string key, string template = "默认") where T : new()
|
||||
public virtual T Get<T>(string key, string template = "默认") where T : new()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key) && CacheDic.TryGetValue(key + template, out CacheTable ca))
|
||||
{
|
||||
@@ -136,7 +136,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
/// <param name="key">key</param>
|
||||
/// <param name="data">Data</param>
|
||||
/// <param name="cacheTime">Cache time</param>
|
||||
public virtual void Set(string key, object data, int cacheTime = CacheTimeout, string template = "默认")
|
||||
public virtual void Set(string key, object data, int cacheTime = CacheTimeout, string template = "默认")
|
||||
{
|
||||
if (string.IsNullOrEmpty(key) || data == null)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
/// </summary>
|
||||
/// <param name="key">key</param>
|
||||
/// <returns>Result</returns>
|
||||
public virtual bool IsSet(string key, string template = "默认")
|
||||
public virtual bool IsSet(string key, string template = "默认")
|
||||
{
|
||||
return !string.IsNullOrEmpty(key + template) && CacheDic.ContainsKey(key + template);
|
||||
}
|
||||
@@ -189,7 +189,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
/// Removes the value with the specified key from the cache
|
||||
/// </summary>
|
||||
/// <param name="key">/key</param>
|
||||
public virtual void Remove(string key, string template = "默认")
|
||||
public virtual void Remove(string key, string template = "默认")
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
@@ -214,11 +214,11 @@ namespace YLErp.Modules.DataCacheModule
|
||||
List<string> fliterList = new List<string>();
|
||||
switch (reportType)
|
||||
{
|
||||
case "交易明细": fliterList = TradeDetailReport; break;
|
||||
case "互换明细": fliterList = TradeSwapDetailReport; break;
|
||||
case "结算报告": fliterList = ClientBalanceReport; break;
|
||||
case "交易明细": fliterList = TradeDetailReport; break;
|
||||
case "互换明细": fliterList = TradeSwapDetailReport; break;
|
||||
case "结算报告": fliterList = ClientBalanceReport; break;
|
||||
default:
|
||||
throw new ServiceException("错误的报告类型");
|
||||
throw new ServiceException("错误的报告类型");
|
||||
}
|
||||
using (ErpBaseContext db = new ErpBaseContext())
|
||||
{
|
||||
@@ -231,11 +231,11 @@ namespace YLErp.Modules.DataCacheModule
|
||||
List<string> fliterList = new List<string>();
|
||||
switch (reportType)
|
||||
{
|
||||
case "交易明细": fliterList = TradeDetailReport; break;
|
||||
case "互换明细": fliterList = TradeSwapDetailReport; break;
|
||||
case "结算报告": fliterList = ClientBalanceReport; break;
|
||||
case "交易明细": fliterList = TradeDetailReport; break;
|
||||
case "互换明细": fliterList = TradeSwapDetailReport; break;
|
||||
case "结算报告": fliterList = ClientBalanceReport; break;
|
||||
default:
|
||||
throw new ServiceException("错误的报告类型");
|
||||
throw new ServiceException("错误的报告类型");
|
||||
}
|
||||
using (ErpBaseContext db = new ErpBaseContext())
|
||||
{
|
||||
@@ -247,7 +247,7 @@ namespace YLErp.Modules.DataCacheModule
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ServiceException("不存在 " + needDel + " 模板");
|
||||
throw new ServiceException("不存在 " + needDel + " 模板");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.SS.UserModel;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
@@ -525,6 +526,53 @@ namespace YLErp.Modules.EodModule.SettlementModule
|
||||
fundObject.OtherFund.Add(clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
}
|
||||
}
|
||||
else if (clientEntryexit.Direction.Equals("划转")) {
|
||||
if (clientEntryexit.TransferOutAccount == "初保账户")
|
||||
{
|
||||
AddToFund(fundObject.InFund, clientEntryexit.CurrencyCode, -clientEntryexit.Money ?? 0);
|
||||
// 更新 NetFund
|
||||
AddToFund(fundObject.NetFund, clientEntryexit.CurrencyCode, -clientEntryexit.Money ?? 0);
|
||||
if (clientEntryexit.TransferInAccount == "追保账户")
|
||||
{
|
||||
AddToFund(fundObject.VmInFund, clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WinLoss += clientEntryexit.Money ?? 0;
|
||||
CurrChangeAmount += clientEntryexit.Money ?? 0;
|
||||
}
|
||||
}
|
||||
else if (clientEntryexit.TransferOutAccount == "追保账户")
|
||||
{
|
||||
AddToFund(fundObject.VmInFund, clientEntryexit.CurrencyCode, -clientEntryexit.Money ?? 0);
|
||||
if (clientEntryexit.TransferInAccount == "初保账户")
|
||||
{
|
||||
AddToFund(fundObject.InFund, clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
// 更新 NetFund
|
||||
AddToFund(fundObject.NetFund, clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WinLoss += clientEntryexit.Money ?? 0;
|
||||
CurrChangeAmount += clientEntryexit.Money ?? 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WinLoss -= clientEntryexit.Money ?? 0;
|
||||
CurrChangeAmount -= clientEntryexit.Money ?? 0;
|
||||
if (clientEntryexit.TransferInAccount == "初保账户")
|
||||
{
|
||||
AddToFund(fundObject.InFund, clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
// 更新 NetFund
|
||||
AddToFund(fundObject.NetFund, clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddToFund(fundObject.VmInFund, clientEntryexit.CurrencyCode, clientEntryexit.Money ?? 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ClientCashInCashOut.系统操作_期权费.Equals(clientEntryexit.Action))
|
||||
|
||||
@@ -3,6 +3,7 @@ using YLErp.Model;
|
||||
using YLErp.Modules.SuperviseReportModule.ExtendReport.Common;
|
||||
using YLErp.Modules.SuperviseReportModule.ExtendReport.GeLin;
|
||||
using YLErp.Modules.SuperviseReportModule.ExtendReport.ZheQi;
|
||||
using YLErp.Modules.SuperviseReportModule.ExtendReport.ZheShang;
|
||||
|
||||
namespace YLErp.Modules.SuperviseReportModule.ExtendReport
|
||||
{
|
||||
@@ -48,6 +49,9 @@ namespace YLErp.Modules.SuperviseReportModule.ExtendReport
|
||||
case "客户资金记录报表":
|
||||
service = new CustomerFundsReport(optUser, req);
|
||||
break;
|
||||
case "月报基础数据债券收益互换":
|
||||
service = new SwapTradeMothReport(optUser, req);
|
||||
break;
|
||||
default:
|
||||
throw new ServiceException("报表未实现");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
using BaseOUDAL;
|
||||
using CsvHelper;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using Qdp.Foundation.Utilities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YLErp.DBModels;
|
||||
using YLErp.DBModels.Consts;
|
||||
using YLErp.DBModels.Enums;
|
||||
using YLErp.Helpers;
|
||||
using YLErp.Model;
|
||||
using YLErp.Modules.SuperviseReportModule.ExtendReport.ZheQi;
|
||||
|
||||
namespace YLErp.Modules.SuperviseReportModule.ExtendReport.ZheShang
|
||||
{
|
||||
public class SwapTradeMothReport: SimpleExtendReportBaseService
|
||||
{
|
||||
public SwapTradeMothReport(OptUserInfo userInfo, SuperviseReportReq req) : base(userInfo, req)
|
||||
{
|
||||
}
|
||||
public override string TemplateName => "月报基础数据债券收益互换.xlsx";
|
||||
public override string TargetFileName => "月报基础数据债券收益互换"+ base.RequestInfo.ValueDate.ToString("yyyyMM") +".xlsx";
|
||||
public override Dictionary<string, object> SearchReportInfo()
|
||||
{
|
||||
var yearMonth = RequestInfo.ValueDate.ToString("yyyy-MM-dd");
|
||||
var dealList = new List<SwapTradeMothReportModel>();
|
||||
var addList= new List<SwapTradeMothReportModel>();
|
||||
var reportData = GetSwapMonthReport(yearMonth);
|
||||
if (reportData != null)
|
||||
{
|
||||
if (reportData.DealList != null && reportData.DealList.Count > 0)
|
||||
{
|
||||
dealList = reportData.DealList;
|
||||
}
|
||||
if (reportData.AddList != null && reportData.AddList.Count > 0)
|
||||
{
|
||||
addList = reportData.AddList;
|
||||
}
|
||||
}
|
||||
return new Dictionary<string, object>() {
|
||||
{"本月新增业务明细", addList},
|
||||
{"本月末存量业务明细", dealList}
|
||||
};
|
||||
}
|
||||
|
||||
private SwapTradeMothReportModelList GetSwapMonthReport(string yearMonth)
|
||||
{
|
||||
var baseUrl = Environment.GetEnvironmentVariable("Reg_Report_Url");
|
||||
var calculateUrl = "/swap-trade/month-report?date="+yearMonth;
|
||||
LogFactory.GetLogger("SwapTradeMothReport").Info("获取收益互换月报信息地址:" + baseUrl+ calculateUrl);
|
||||
if (!string.IsNullOrEmpty(baseUrl))
|
||||
{
|
||||
var httpHelper = new HttpHelper(baseUrl, null);
|
||||
var result = httpHelper.GetRequestNoAuth< SwapTradeMothReportModelListReponse>(calculateUrl).Result;
|
||||
if (result != null && !result.success)
|
||||
{
|
||||
LogFactory.GetLogger("SwapTradeMothReport").Info("获取收益互换月报信息失败:" + result.message);
|
||||
}
|
||||
else
|
||||
{
|
||||
return result.data;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YLErp.Models;
|
||||
|
||||
namespace YLErp.Modules.SuperviseReportModule.ExtendReport.ZheShang
|
||||
{
|
||||
public class SwapTradeMothReportModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 报送机构名称(全称)
|
||||
/// </summary>
|
||||
public string NameOfSecuritiesCompany { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易对手方名称(全称)
|
||||
/// </summary>
|
||||
public string NameOfCounterparty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易对手产品名称
|
||||
/// </summary>
|
||||
public string NameOfCounterpartyProduct { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易确认书编号(报告库编号)
|
||||
/// </summary>
|
||||
public string TransactionConfirmationNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务类型 (如场外期权/收益互换)
|
||||
/// </summary>
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名义本金/多头名义本金 (元)
|
||||
/// </summary>
|
||||
public decimal? NotionalPrincipalAmountL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 空头名义本金(元) (多空组合填写)
|
||||
/// </summary>
|
||||
public decimal? SNotionalPrincipalAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 起始日(T日)
|
||||
/// </summary>
|
||||
public string StartDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 到期日
|
||||
/// </summary>
|
||||
public string DueDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标的类型
|
||||
/// </summary>
|
||||
public string SumInvestmentTargetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标的名称
|
||||
/// </summary>
|
||||
public string UndrlygAssetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标的编码
|
||||
/// </summary>
|
||||
public string UndrlygAssetCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标的交易场所
|
||||
/// </summary>
|
||||
public string UndrlygAssetTradgPlc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场外期权标的小类 (当业务类型为场外期权时填写)
|
||||
/// </summary>
|
||||
public string OptionSumInvestmentTargetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收益互换标的小类 (当业务类型为收益互换时填写)
|
||||
/// </summary>
|
||||
public string ExchangeSumInvestmentTargetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 期权费(非年化)(%) (场外期权填写)
|
||||
/// </summary>
|
||||
public decimal? OptionFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 期权类型 (场外期权填写)
|
||||
/// </summary>
|
||||
public string OptionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本月末维持保证金比例(%)
|
||||
/// </summary>
|
||||
public string MaitainMarginRation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标的相关系数 (特殊字段,根据备注"不填"处理)
|
||||
/// </summary>
|
||||
public decimal? CorrelationCoefficient { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// 多头合约价值(元)
|
||||
/// </summary>
|
||||
public decimal? LongPositionContractValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 空头合约价值(元)
|
||||
/// </summary>
|
||||
public decimal? ShortPositionContractValue { get; set; }
|
||||
}
|
||||
public class SwapTradeMothReportModelListReponse : ApiResponse
|
||||
{
|
||||
public SwapTradeMothReportModelList data { get; set; }
|
||||
}
|
||||
|
||||
public class SwapTradeMothReportModelList
|
||||
{
|
||||
public List<SwapTradeMothReportModel> DealList { get; set; }
|
||||
public List<SwapTradeMothReportModel> AddList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using BaseOUDAL;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Qdp.Foundation.Utilities;
|
||||
using YLErp.DBModels;
|
||||
using YLErp.DBModels.Consts;
|
||||
@@ -77,7 +79,8 @@ namespace YLErp.Modules.TradeModule
|
||||
{
|
||||
oaResult.status = "提交成功";
|
||||
oaResult.oa_fileid = oaResp.data?.fileid;
|
||||
oaResult.oa_msg = oaResp.data?.url;
|
||||
oaResult.oa_msg = oaResp.message;
|
||||
oaResult.oa_url = oaResp.data?.url;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -110,7 +113,11 @@ namespace YLErp.Modules.TradeModule
|
||||
// 获取OA配置
|
||||
var oaConfigSection = AppManager.GetConfiguration().GetSection("oa_confg");
|
||||
var baseUrl = oaConfigSection["BaseUrl"];
|
||||
var loginName = UserInfo.OaAccount;
|
||||
var loginName = string.Empty;
|
||||
using (var adminDb = new ErpBaseContext()) {
|
||||
var userInfo=adminDb.SystemUsers.FirstOrDefault(x=>x.Id==UserInfo.UserId);
|
||||
loginName= userInfo?.OaAccount;
|
||||
}
|
||||
var systemKey = oaConfigSection["SystemKey"];
|
||||
var objectClass = oaConfigSection["ObjectClass"];
|
||||
var urgent = int.Parse(oaConfigSection["Urgent"] ?? "1");
|
||||
@@ -192,25 +199,34 @@ namespace YLErp.Modules.TradeModule
|
||||
if (totalNotionalPrincipal > 0)
|
||||
{
|
||||
decimal weightedMarginSum = 0;
|
||||
decimal totalCount = 0;
|
||||
foreach (var t in matchingPositions) {
|
||||
var marginDetail = UnderlyingHelper.GetApplicableMarginRate(t.ClientId, t.UnderlyingCode, t.TradeDate.Value);
|
||||
var rate = marginDetail?.init_rate ?? 0;
|
||||
weightedMarginSum += rate*Convert.ToDecimal(t.OriginalStockEqvNotional);
|
||||
totalCount+= Convert.ToDecimal(t.OriginalStockEqvNotional);
|
||||
}
|
||||
marginRate = weightedMarginSum / totalCount;
|
||||
marginRate=Math.Round(marginRate, 4); // 保留四位小数
|
||||
marginRate = weightedMarginSum / Convert.ToDecimal(totalNotionalPrincipal);
|
||||
// marginRate=Math.Round(marginRate, 4); // 保留四位小数
|
||||
}
|
||||
|
||||
var posiTypeStr = currentPositionType == (int)PositionTypeFlag.Long ? "买入" : "卖出";
|
||||
string bgContent = @$"<p>各位领导:</p>
|
||||
<p style=""margin-left: 40px"">经友好协商,我司拟与交易对手开展以下场外利率收益互换交易:</p>
|
||||
<p style=""margin-left: 40px;"">浮动收益交付方: 浙商证券</p>
|
||||
<p style=""margin-left: 40px;"">存款收益接收方: {trade.ClientName}</p>
|
||||
<p style=""margin-left: 111px;"">标的: {trade.UnderlyingInstrumentTypeCn}</p>
|
||||
<p style=""margin-left: 111px;"">方向: {posiTypeStr}</p>
|
||||
<p style=""margin-left: 95px;"">起始日: {trade.StartDate?.ToString("yyyy/M/d")}</p>
|
||||
<p style=""margin-left: 95px;"">到期日: {exerciseDate?.ToString("yyyy/M/d")}</p>
|
||||
<p style=""margin-left: 48px;"">合约名义本金: {totalNotionalPrincipal:N0}元</p>
|
||||
<p style=""margin-left: 48px;"">保证金支付方: {trade.ClientName}</p>
|
||||
<p>交易标的满足浙商证券标的池管理要求,交易对手方为非交易商,提供【{(marginRate*100).ToString("0.##")}%】名义本金的履约担保品作为初始保证金。保证金预警线与盯市追保符合内外规要求。</p>";
|
||||
// 构建OA请求参数
|
||||
var oaRequest = new
|
||||
{
|
||||
loginname = loginName,
|
||||
systemkey = systemKey,
|
||||
objectclass = objectClass,
|
||||
title = $"交易确认书OA申请-{trade.ClientName}-{contractCode}",
|
||||
title = $"关于场外利率债收益互换交易的审批盖章申请({trade.TradeDate.Value.ToString("yyyyMMdd")}-{trade.ClientName})",
|
||||
urgent = urgent,
|
||||
issend = issend,
|
||||
copyattfileid = "",
|
||||
@@ -229,7 +245,7 @@ namespace YLErp.Modules.TradeModule
|
||||
CKDX1 = "",
|
||||
CKDX2 = "",
|
||||
LB = "",
|
||||
QSBGNR = $"各位领导:\n\t\t经友好协商,我司拟与交易对手开展以下场外利率收益互换交易:\n浮动收益交付方\t存款收益接收方\t标的\t方向\t起始日\t到期日\t合约名义本金\t保证金支付方\n浙商证券\t{trade.ClientName}\t{trade.UnderlyingInstrumentTypeCn}\t{posiTypeStr}\t{trade.StartDate?.ToString("yyyy/M/d")}\t{exerciseDate?.ToString("yyyy/M/d")}\t{totalNotionalPrincipal:N0}元\t{trade.ClientName}\n交易标的满足浙商证券标的池管理要求,交易对手方为非交易商,提供【{(marginRate*100).ToString("0.##")}%】名义本金的履约担保品作为初始保证金。保证金预警线与盯市追保符合内外规要求。",
|
||||
QSBGNR = bgContent,
|
||||
MX = new object[0],
|
||||
SQMX = new object[0]
|
||||
},
|
||||
@@ -239,7 +255,7 @@ namespace YLErp.Modules.TradeModule
|
||||
logger.Info($"OA接口参数:{JsonHelper.Serialize(oaRequest)}");
|
||||
// 调用OA接口
|
||||
var httpClient = new HttpClientWrap(baseUrl);
|
||||
var response = httpClient.PostJson("/fileDraft", oaRequest, null);
|
||||
var response = httpClient.PostJson("/ZSZQ/fileDraft", oaRequest, null);// fileDraft
|
||||
logger.Info($"OA接口返回:{response}");
|
||||
// 解析响应
|
||||
var responseObj = JsonHelper.Deserialize<OAResponse>(response);
|
||||
|
||||
@@ -53,14 +53,11 @@ namespace YLErp.Web
|
||||
GlobalConfig.EnableExtendSetting = true;
|
||||
GlobalConfig.ProjectTitle = "场外衍生品业务管理系统";
|
||||
break;
|
||||
case Configuration.CompanyEnum.浙期:
|
||||
case Configuration.CompanyEnum.浙商:
|
||||
GlobalConfig.ExtendReportType.Add("月报基础数据债券收益互换", 2);
|
||||
break;
|
||||
case Configuration.CompanyEnum.方顿:
|
||||
|
||||
if (PS.Config.Company == Configuration.CompanyEnum.浙期)
|
||||
{
|
||||
GlobalConfig.ExtendReportType.Add("成交明细汇总", 1);
|
||||
}
|
||||
GlobalConfig.ExtendReportType.Add("风险资本准备计算表", 1);
|
||||
GlobalConfig.ExtendReportType.Add("风险资本准备计算表", 1);
|
||||
break;
|
||||
case Configuration.CompanyEnum.格林大华:
|
||||
GlobalConfig.ExtendReportType.Add("客户持仓信息", 3);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
{Name:"交易确认书",Rights:["结算管理-交易确认书"],Url:"TradeConfirmBook/ConfirmBookListByClient"},
|
||||
{Name:"结算确认书",Rights:["结算管理-结算确认书"],Url:"swaptrade2/tradeEndConfirmList"},
|
||||
{Name:"每日估值报告",Rights:["结算管理-每日估值报告"],Url:"clientbalance/TradeMarketReport"},
|
||||
{Name:"其他报告",Rights:["结算管理-其他报告"],Url:"supervise_report/ExtendReport"},
|
||||
]
|
||||
},
|
||||
{Name:"监管报告",Rights:["监管报告"],Icon:"menu-icon iconteleven"
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,22 @@
|
||||
using Dapper;
|
||||
using BaseOUDAL;
|
||||
using Dapper;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
using Org.BouncyCastle.Asn1.Ocsp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using YLErp.Abstract;
|
||||
using YLErp.BLL;
|
||||
using YLErp.DBModels;
|
||||
using YLErp.DBModels.Consts;
|
||||
using YLErp.Modules.DictionaryModule;
|
||||
using YLErp.Modules.SystemModule;
|
||||
using YLErp.Web.Models;
|
||||
|
||||
namespace YLErp.Web.Controllers
|
||||
{
|
||||
@@ -667,7 +678,7 @@ namespace YLErp.Web.Controllers
|
||||
r.Password = null;
|
||||
return View(r);
|
||||
}
|
||||
|
||||
|
||||
[MyAuthorize("系统管理-用户管理")]
|
||||
public ActionResult UserLevelView(int id)
|
||||
{
|
||||
@@ -852,6 +863,15 @@ namespace YLErp.Web.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
public JsonResult accountDelete(int accountIds)
|
||||
{
|
||||
var r = basedb.SystemUsers.Find(accountIds);
|
||||
r.State = 2;
|
||||
basedb.SaveChanges();
|
||||
new SysUserService(CurUser).UpdateState(accountIds, 2);
|
||||
return JsonSuccess("注销账户成功", r);
|
||||
}
|
||||
|
||||
public JsonResult accountAble(int accountIds)
|
||||
{
|
||||
var r = basedb.SystemUsers.Find(accountIds);
|
||||
|
||||
@@ -354,7 +354,7 @@ namespace YLErp.Web.Controllers
|
||||
{
|
||||
return JsonError("找不到出入金信息");
|
||||
}
|
||||
if (r.Direction != "出金" && r.Direction != "入金" && r.Direction != "其他收入" && r.Direction != "其他支出")
|
||||
if (r.Direction != "出金" && r.Direction != "入金" && r.Direction != "其他收入" && r.Direction != "其他支出" && r.Direction != "划转")
|
||||
{
|
||||
return JsonError("该笔交易不可以删除");
|
||||
}
|
||||
|
||||
@@ -1394,7 +1394,7 @@ namespace YLErp.Web.Controllers
|
||||
{
|
||||
Directory.CreateDirectory(targetPath);
|
||||
}
|
||||
|
||||
ExcelPackage.LicenseContext= LicenseContext.NonCommercial;
|
||||
var targetFileName = Path.Combine(targetPath, service.TargetFileName);
|
||||
var path = ExcelTemplate.GeneratePDFFromExeclTemplate(sourcePath, sourceFileName, modelDict, targetPath, targetFileName, null, null, null, false);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:49462",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "local"
|
||||
"ASPNETCORE_ENVIRONMENT": "dev"
|
||||
},
|
||||
"applicationUrl": "http://localhost:49462"
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="formlabel ">成交均价</label>
|
||||
<vue-number-input v-model="swapflow.TradingAmountAvg" v-bind:format="inputFormatTradePrice"></vue-number-input>
|
||||
<vue-number-input v-model="swapflow.TradingAmountAvg" v-bind:format="inputFormatTradePrice" v-on:input="changeSpotPrice()"></vue-number-input>
|
||||
</div>
|
||||
@*<div class="form-group">
|
||||
<label class="formlabel ">成交均价含费</label>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<div class="form-group col-md-6">
|
||||
<div class="row no-gutters">
|
||||
<label class="formlabel">状态</label>
|
||||
@Html.DropDownListFor(model => model.State, new SelectListItem[] { new SelectListItem { Text = "正常", Value = "0" }, new SelectListItem { Text = "禁用", Value = "1" } })
|
||||
@Html.DropDownListFor(model => model.State, new SelectListItem[] { new SelectListItem { Text = "正常", Value = "0" }, new SelectListItem { Text = "禁用", Value = "1" }, new SelectListItem { Text = "已注销", Value = "2" } })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
};
|
||||
}
|
||||
|
||||
@section JS{
|
||||
@section JS {
|
||||
<script type="text/javascript">
|
||||
|
||||
var page = @Json.Serialize(pageObj);
|
||||
@@ -74,31 +74,27 @@
|
||||
return rowObject.StateDesc;
|
||||
}
|
||||
},
|
||||
{ name: '', label: "操作", index: '', width: 140, algin: 'center', formatter: showToolName },
|
||||
{ name: '', label: "操作", index: '', width: 200, algin: 'center', formatter: showToolName },
|
||||
{ name: '', label: "账号层级关系", index: '', width: 140, algin: 'center', formatter: showLevel },
|
||||
];
|
||||
function showToolName(cellValue, options, rowObject) {
|
||||
var html = "";
|
||||
if (page.isUserEdit && rowObject.StateDesc != "禁用") {
|
||||
if (page.isUserEdit && rowObject.StateDesc == "正常") {
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" title='修改' onclick=\"modifyView('{0}')\" value=\"{1}\" />".template(rowObject.id, "修改");
|
||||
}
|
||||
else
|
||||
{
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" title='修改' disabled='disabled'\" value=\"{1}\" />".template(rowObject.id, "修改");
|
||||
|
||||
}
|
||||
if (page.isUserState && (rowObject.LoginName.toLowerCase() != "supera" || page.isInitUser)) {
|
||||
if (rowObject.StateDesc == "禁用") {
|
||||
|
||||
html = html + "<input type=\"button\" class=\"wentiEdit\" title='启用' onclick=\"enable({0})\" value=\"{1}\" />".template(rowObject.id, "启用");
|
||||
} else {
|
||||
} else if (rowObject.StateDesc == "正常") {
|
||||
html = html + "<input type=\"button\" class=\"wentiEdit\" title='禁用' onclick=\"disable({0})\" value=\"{1}\" />".template(rowObject.id, "禁用");
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" title='修改' onclick=\"deleteView('{0}')\" value=\"{1}\" />".template(rowObject.id, "注销");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (rowObject.StateDesc == "禁用") {
|
||||
|
||||
html = html + "<input type=\"button\" class=\"wentiEdit\" title='启用' disabled='disabled'\" value=\"{1}\" />".template(rowObject.id, "启用");
|
||||
} else {
|
||||
} else if (rowObject.StateDesc == "正常") {
|
||||
html = html + "<input type=\"button\" class=\"wentiEdit\" title='禁用' disabled='disabled'\" value=\"{1}\" />".template(rowObject.id, "禁用");
|
||||
}
|
||||
}
|
||||
@@ -125,6 +121,13 @@
|
||||
function modifyView(id) {
|
||||
main.infopage("修改用户信息", './UserEdit/' + id);
|
||||
}
|
||||
|
||||
function deleteView(id) {
|
||||
main.confirmPost("确认注销用户? (该操作无法恢复!)", "/System/accountDelete", { accountIds: id }).done(function (data) {
|
||||
SearchClick(true);
|
||||
});
|
||||
}
|
||||
|
||||
function enable(id) {
|
||||
main.confirmPost("确认启用账号?", "/System/accountAble", { accountIds: id }).done(function (data) {
|
||||
SearchClick(true);
|
||||
@@ -153,11 +156,14 @@
|
||||
DepartmentIds: $("#Department").val() == null ? "" : $("#Department").val().join(",")
|
||||
});
|
||||
$('#listGrid').appendPostData({ UserGroup: $("#UserGroup").val()});
|
||||
if ($("#checkEnabled").prop("checked") && !$("#checkDisabled").prop("checked")) {
|
||||
if ($("#checkEnabled").prop("checked") ) {
|
||||
$('#listGrid').appendPostData({ State: 0 });
|
||||
} else if ($("#checkDisabled").prop("checked") && !$("#checkEnabled").prop("checked")) {
|
||||
} else if ($("#checkDisabled").prop("checked") ) {
|
||||
$('#listGrid').appendPostData({ State: 1 });
|
||||
} else {
|
||||
} else if ($("#checkDeleted").prop("checked") ) {
|
||||
$('#listGrid').appendPostData({ State: 2 });
|
||||
}
|
||||
else {
|
||||
$('#listGrid').appendPostData({ State: null });
|
||||
}
|
||||
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
|
||||
@@ -173,6 +179,7 @@
|
||||
$("#Department").ResetAceDropDown();
|
||||
$("#checkEnabled").prop("checked",false);
|
||||
$("#checkDisabled").prop("checked",false);
|
||||
$("#checkDeleted").prop("checked",false);
|
||||
SearchClick(true);
|
||||
}
|
||||
|
||||
@@ -221,6 +228,7 @@
|
||||
$("#Department").ResetAceDropDown();
|
||||
$("#checkEnabled").prop("checked",false);
|
||||
$("#checkDisabled").prop("checked",false);
|
||||
$("#checkDeleted").prop("checked",false);
|
||||
|
||||
var flag = false;
|
||||
if (window.tdSelectionInfo.searchParamId === "State") {
|
||||
@@ -231,6 +239,10 @@
|
||||
$("#checkDisabled").prop("checked", true);
|
||||
flag = true;
|
||||
}
|
||||
else if (window.tdSelectionInfo.text === "已注销") {
|
||||
$("#checkDeleted").prop("checked", true);
|
||||
flag = true;
|
||||
}
|
||||
} else {
|
||||
$("#" + window.tdSelectionInfo.searchParamId).find("option").each(function() {
|
||||
if (this.text == window.tdSelectionInfo.text) {
|
||||
@@ -277,6 +289,7 @@
|
||||
@Html.MyAceDropdownInput("Department", "所属部门", GlobalData.GetAllDepartements())
|
||||
状态:<input type="checkbox" id="checkEnabled" />正常
|
||||
<input type="checkbox" id="checkDisabled" />禁用
|
||||
<input type="checkbox" id="checkDeleted" />已注销
|
||||
@MyControls.Btn("筛选", "return(SearchClick(true));")
|
||||
@if (pageObj.isUserAdd)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
@MyControls.Btn("批量下载交易确认书", "BatchDownLoadDoc()")
|
||||
<button class="btn btn-primary" id="batchSendEmail" style="margin-left:16px;">批量发送邮件</button>
|
||||
@* <button class="btn btn-primary" id="batchSendOA" style="margin-left:16px;">批量发送OA</button> *@
|
||||
<button class="btn btn-primary" id="batchSendOA" style="margin-left:16px;">批量发送OA</button>
|
||||
@if (PS.GetErpConfig().IsAutoSealAndUploadFiles && !PS.GetErpConfig().IsAutoSealAfterGeneratedBook)
|
||||
{
|
||||
@MyControls.Btn("批量确认书用印", "BatchSealContracts()")
|
||||
|
||||
@@ -110,10 +110,31 @@
|
||||
<option value="追保账户" @(Model.cash_type == "追保账户" ? "selected" : "")>追保账户</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-6" id="transfer_out_container">
|
||||
<label class="formlabel">转出科目</label>
|
||||
<select name="TransferOutAccount" id="TransferOutAccount" onchange="setTransferMoney()" @(Model.id > 0 ? "disabled" : "")>
|
||||
@foreach (var item in EntryExitBLL.TransferAccount)
|
||||
{
|
||||
<option value="@(item)" @(item == Model.TransferOutAccount ? "selected" : "")>@(item)</option>
|
||||
}
|
||||
</select>
|
||||
<label id="transfer_out_account_money">余额:</label>
|
||||
</div>
|
||||
<div class="form-group col-6" id="transfer_in_container">
|
||||
<label class="formlabel">转入科目</label>
|
||||
<select name="TransferInAccount" id="TransferInAccount" onchange="setTransferMoney()" @(Model.id > 0 ? "disabled" : "")>
|
||||
@foreach (var item in EntryExitBLL.TransferAccount)
|
||||
{
|
||||
<option value="@(item)" @(item == Model.TransferInAccount ? "selected" : "")>@(item)</option>
|
||||
}
|
||||
</select>
|
||||
<label id="transfer_in_account_money">余额:</label>
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label class="formlabel">金额</label>
|
||||
<input id="MoneyStr" class="text-box" type="text" value="@(Model.MoneyStr)" name="MoneyStr" oninput="moneyInputMgr.onInput()" onfocus="moneyInputMgr.onFocus()" onblur="moneyInputMgr.onChange()" autocomplete="off">
|
||||
<span></span>
|
||||
<a href="javascript:void(0)" onclick="transferAll()" id="transferAll">全部转出</a>
|
||||
</div>
|
||||
|
||||
@if (Model.TradeId == null || Model.TradeId == 0)
|
||||
@@ -130,7 +151,7 @@
|
||||
<input class='form_datetime text-box' size='16' id='HappenDate' type='text' value='@(Model.HappenDate?.ToString("yyyy-MM-dd HH:mm"))' name='HappenDate' />
|
||||
</div>
|
||||
|
||||
<div class="form-group col-12">
|
||||
<div class="form-group col-6">
|
||||
<label class="formlabel">银行账号</label>
|
||||
@if (pageObj.changeBeforeConfirm)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
TradeAction: isCompanyCash ? "@ClientCashInCashOut.人工操作_预付金" : ""
|
||||
};
|
||||
if (!isCompanyCash) {
|
||||
PostData.DirectionTypes = "出金,入金,权利金支出,权利金收入,平仓/行权支出,平仓/行权收入,票息支出,票息收入,其他支出,其他收入,互换收入,互换支出";
|
||||
// PostData.DirectionTypes = "出金,入金,权利金支出,权利金收入,平仓/行权支出,平仓/行权收入,票息支出,票息收入,其他支出,其他收入,互换收入,互换支出";
|
||||
} else {
|
||||
PostData.InOut = "应收,应付";
|
||||
}
|
||||
@@ -394,7 +394,7 @@
|
||||
|
||||
function customButton(cellValue, options, rowObject) {
|
||||
var imageHtml = "";
|
||||
if ((rowObject.Direction == "出金" || rowObject.Direction == "入金" || rowObject.Direction == "其他收入" || rowObject.Direction == "其他支出") && pageData.canDelete && rowObject.TradeNumber == "" && rowObject.ApprovalProcess < 1) {
|
||||
if ((rowObject.Direction == "出金" || rowObject.Direction == "入金" || rowObject.Direction == "其他收入" || rowObject.Direction == "其他支出"|| rowObject.Direction == "划转") && pageData.canDelete && rowObject.TradeNumber == "" && rowObject.ApprovalProcess < 1) {
|
||||
imageHtml = imageHtml + "<input type=\"button\" value=\"删除\" class=\"wentiEdit\" onclick=\"deleteentryexit('" +
|
||||
rowObject.EncryptId +
|
||||
"');\" />";
|
||||
@@ -495,7 +495,7 @@
|
||||
if (isCompanyCash) {
|
||||
addurl += "?isCompanyCash=1";
|
||||
}
|
||||
main.open("新增资金记录", addurl, { area: ['1000px', '75%'] });
|
||||
main.open("新增资金记录", addurl, { area: ['1000px', '95%'] });
|
||||
}
|
||||
|
||||
function Entryexit_remove() {
|
||||
@@ -505,7 +505,7 @@
|
||||
|
||||
function startentryexitView(id) {
|
||||
var srcurl = "/entryexit/entryexitView/?enid=" + id;
|
||||
main.open("查看资金信息", srcurl, { area: ['1000px', '75%'] });
|
||||
main.open("查看资金信息", srcurl, { area: ['1000px', '95%'] });
|
||||
}
|
||||
|
||||
function reloadentryexit() {
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
<tr>@Html.MyDisplayFor(m => m.ClientName)</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.DirectionType)</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.cash_type)</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.TransferOutAccount)</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.TransferInAccount)</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.Money, (((Model.Direction == "出金" ? (-1) : 1) * Model.Money) ?? 0).ToString("N"))</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.CurrencyCode)</tr>
|
||||
<tr>@Html.MyDisplayFor(m => m.HappenDate, Utilities.ShowValidDatetime(Model.HappenDate, "yyyy-MM-dd HH:mm:ss"))</tr>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@{
|
||||
ViewBag.Title = "其他报表";
|
||||
ViewBag.Title = "其他报告";
|
||||
Layout = "~/Views/Shared/_MainLayout.cshtml";
|
||||
var pageObj = new
|
||||
{
|
||||
@@ -9,7 +9,7 @@
|
||||
defaultType = GlobalConfig.ExtendReportType.FirstOrDefault().Key,
|
||||
};
|
||||
}
|
||||
@section CSS{
|
||||
@section CSS {
|
||||
<style>
|
||||
#DateValueDate, #DateStartDate, #DateEndDate {
|
||||
width: 152px !important;
|
||||
@@ -21,167 +21,165 @@
|
||||
}
|
||||
</style>
|
||||
}
|
||||
@section JS{
|
||||
@section JS{
|
||||
|
||||
<script src="~/Statics/libs/input/cleave.min.js?v=@(HtmlUtil.JsVersion)"></script>
|
||||
<script src="~/Statics/libs/input/cleave.js?v=@(HtmlUtil.JsVersion)"></script>
|
||||
<script type="text/javascript">
|
||||
var pageObj = @Json.Serialize(pageObj);
|
||||
$(function () {
|
||||
main.setTradeDatePicker(pageObj.valueDate, "");
|
||||
$("#DateValueDate,#DateStartDate,#DateEndDate").datepicker({
|
||||
changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true,
|
||||
onSelect: function (se) {
|
||||
var pageObj = @Json.Serialize(pageObj);
|
||||
$(function () {
|
||||
main.setTradeDatePicker(pageObj.valueDate, "");
|
||||
$("#DateValueDate,#DateStartDate,#DateEndDate").datepicker({
|
||||
changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true,
|
||||
onSelect: function (se) {
|
||||
|
||||
}
|
||||
});
|
||||
new Cleave('#ValueMonthly', {
|
||||
date: true,
|
||||
dateMin: '2010-01',
|
||||
dateMax: '2099-12',
|
||||
datePattern: ['Y', 'm'],
|
||||
delimiter: "-"
|
||||
});
|
||||
$("#ValueMonthly").val(pageObj.valueDate.substr(0, 7));
|
||||
}
|
||||
});
|
||||
$("#ValueMonthly").val(pageObj.valueDate.substr(0, 7));
|
||||
|
||||
$("#DateValueDate").val(pageObj.valueDate);
|
||||
$("#DateStartDate").val(pageObj.valueDate);
|
||||
$("#DateEndDate").val(pageObj.valueDate);
|
||||
$("#DateFromValueDate1").val(pageObj.valueDate);
|
||||
$("#DateToValueDate1").val(pageObj.valueDate);
|
||||
$("#DateValueDate").datepicker("option", "maxDate", pageObj.valueDate);
|
||||
$("#DataSource").change(function () {
|
||||
$("[tag]").hide();
|
||||
var tag = $("#DataSource").val();
|
||||
$("[tag='" + tag + "']").show();
|
||||
})
|
||||
$("#DataSource").change();
|
||||
});
|
||||
$("#DateValueDate").val(pageObj.valueDate);
|
||||
$("#DateStartDate").val(pageObj.valueDate);
|
||||
$("#DateEndDate").val(pageObj.valueDate);
|
||||
$("#DateFromValueDate1").val(pageObj.valueDate);
|
||||
$("#DateToValueDate1").val(pageObj.valueDate);
|
||||
$("#DateValueDate").datepicker("option", "maxDate", pageObj.valueDate);
|
||||
$("#DataSource").change(function () {
|
||||
$("[tag]").hide();
|
||||
var tag = $("#DataSource").val();
|
||||
$("[tag='" + tag + "']").show();
|
||||
})
|
||||
$("#DataSource").change();
|
||||
});
|
||||
|
||||
function checkExportDate(tag) {
|
||||
switch (tag) {
|
||||
case "1":
|
||||
return $("#DateValueDate").val() == null || $("#DateValueDate").val() == "" || $("#DateValueDate").val() == undefined;
|
||||
case "2":
|
||||
return $("#ValueMonthly").val() == null || $("#ValueMonthly").val() == "" || $("#ValueMonthly").val() == undefined;
|
||||
case "3":
|
||||
return $("#DateStartDate").val() == null || $("#DateStartDate").val() == "" || $("#DateStartDate").val() == undefined
|
||||
|| $("#DateEndDate").val() == null || $("#DateEndDate").val() == "" || $("#DateEndDate").val() == undefined;
|
||||
case "4":
|
||||
return $("#DateFromValueDate1").val() == null || $("#DateFromValueDate1").val() == "" || $("#DateFromValueDate1").val() == undefined
|
||||
|| $("#DateToValueDate1").val() == null || $("#DateToValueDate1").val() == "" || $("#DateToValueDate1").val() == undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function checkExportDate(tag) {
|
||||
switch (tag) {
|
||||
case "1":
|
||||
return $("#DateValueDate").val() == null || $("#DateValueDate").val() == "" || $("#DateValueDate").val() == undefined;
|
||||
case "2":
|
||||
return $("#ValueMonthly").val() == null || $("#ValueMonthly").val() == "" || $("#ValueMonthly").val() == undefined;
|
||||
case "3":
|
||||
return $("#DateStartDate").val() == null || $("#DateStartDate").val() == "" || $("#DateStartDate").val() == undefined
|
||||
|| $("#DateEndDate").val() == null || $("#DateEndDate").val() == "" || $("#DateEndDate").val() == undefined;
|
||||
case "4":
|
||||
return $("#DateFromValueDate1").val() == null || $("#DateFromValueDate1").val() == "" || $("#DateFromValueDate1").val() == undefined
|
||||
|| $("#DateToValueDate1").val() == null || $("#DateToValueDate1").val() == "" || $("#DateToValueDate1").val() == undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function exportToFile() {
|
||||
var tag = $("#DataSource").val();
|
||||
if (checkExportDate(tag)) {
|
||||
alert("请选择报告日期!");
|
||||
return;
|
||||
}
|
||||
var postData = { DataSource: $("#DataSource").find('option:selected').text() };
|
||||
switch (tag) {
|
||||
case "1":
|
||||
postData.ValueDate = $("#DateValueDate").val();
|
||||
break;
|
||||
case "2":
|
||||
postData.ValueDate = $("#ValueMonthly").val() + "-01";
|
||||
break;
|
||||
case "3":
|
||||
postData.ValueDate = $("#DateStartDate").val();
|
||||
postData.EndDate = $("#DateEndDate").val();
|
||||
break;
|
||||
case "4":
|
||||
postData.ValueDate = $("#DateFromValueDate1").val();
|
||||
postData.EndDate = $("#DateToValueDate1").val();
|
||||
postData.ExtendParamer = JSON.stringify($("#ClientId").val());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
var option = {
|
||||
url: "/supervise_report/SendExtendReport",
|
||||
type: "POST",
|
||||
data: postData,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.success) {
|
||||
window.open(decodeURI(res.obj));
|
||||
}
|
||||
else {
|
||||
main.alert(res.obj || res.msg);
|
||||
}
|
||||
},
|
||||
error: function (msg) {
|
||||
main.alert("后台运行错误:" + msg.msg);
|
||||
}
|
||||
};
|
||||
main.ajax(option);
|
||||
}
|
||||
//显示当前日期
|
||||
// StartDate = start.add(1, 'month').startOf("month").format("YYYY-MM-DD");//下月
|
||||
// ValueDate = end.format("YYYY-MM-DD");//下月
|
||||
function DataSourceChange(obj) {
|
||||
var valueDate = new Date($("#DateValueDate").val());
|
||||
var firstdate = new Date(valueDate.getFullYear(), valueDate.getMonth() - 1, 1);
|
||||
var day = new Date(valueDate.getFullYear(), valueDate.getMonth(), 0).getDate();
|
||||
var enddate = new Date(valueDate.getFullYear(),valueDate.getMonth() - 1, day);
|
||||
switch ($(obj).val()) {
|
||||
case "1":
|
||||
$("#DateValueDate").val(valueDate.format("yyyy-MM-dd"));
|
||||
break;
|
||||
case "2":
|
||||
$("#DateValueDate").val(valueDate.format("yyyy-MM"));
|
||||
break;
|
||||
case "3":
|
||||
$("#DateStartDate").val(valueDate.format("yyyy-MM-dd"));
|
||||
$("#DateEndDate").val(valueDate.format("yyyy-MM-dd"));
|
||||
break;
|
||||
case "4":
|
||||
$("#DateFromValueDate1").val(firstdate.format("yyyy-MM-dd"));
|
||||
$("#DateToValueDate1").val(enddate.format("yyyy-MM-dd"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
//格式化日期
|
||||
Date.prototype.format = function (fmt) {
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //月份
|
||||
"d+": this.getDate(), //日
|
||||
"h+": this.getHours(), //小时
|
||||
"m+": this.getMinutes(), //分
|
||||
"s+": this.getSeconds(), //秒
|
||||
};
|
||||
if (/(y+)/.test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
}
|
||||
for (var k in o) {
|
||||
if (new RegExp("(" + k + ")").test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
}
|
||||
function exportToFile() {
|
||||
var tag = $("#DataSource").val();
|
||||
if (checkExportDate(tag)) {
|
||||
alert("请选择报告日期!");
|
||||
return;
|
||||
}
|
||||
var postData = { DataSource: $("#DataSource").find('option:selected').text() };
|
||||
switch (tag) {
|
||||
case "1":
|
||||
postData.ValueDate = $("#DateValueDate").val();
|
||||
break;
|
||||
case "2":
|
||||
postData.ValueDate = $("#ValueMonthly").val() + "-01";
|
||||
break;
|
||||
case "3":
|
||||
postData.ValueDate = $("#DateStartDate").val();
|
||||
postData.EndDate = $("#DateEndDate").val();
|
||||
break;
|
||||
case "4":
|
||||
postData.ValueDate = $("#DateFromValueDate1").val();
|
||||
postData.EndDate = $("#DateToValueDate1").val();
|
||||
postData.ExtendParamer = JSON.stringify($("#ClientId").val());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
var option = {
|
||||
url: "/supervise_report/SendExtendReport",
|
||||
type: "POST",
|
||||
data: postData,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res.success) {
|
||||
window.open(decodeURI(res.obj));
|
||||
}
|
||||
else {
|
||||
main.alert(res.obj || res.msg);
|
||||
}
|
||||
},
|
||||
error: function (msg) {
|
||||
main.alert("后台运行错误:" + msg.msg);
|
||||
}
|
||||
};
|
||||
main.ajax(option);
|
||||
}
|
||||
//显示当前日期
|
||||
// StartDate = start.add(1, 'month').startOf("month").format("YYYY-MM-DD");//下月
|
||||
// ValueDate = end.format("YYYY-MM-DD");//下月
|
||||
function DataSourceChange(obj) {
|
||||
var valueDate = new Date($("#DateValueDate").val());
|
||||
var firstdate = new Date(valueDate.getFullYear(), valueDate.getMonth() - 1, 1);
|
||||
var day = new Date(valueDate.getFullYear(), valueDate.getMonth(), 0).getDate();
|
||||
var enddate = new Date(valueDate.getFullYear(),valueDate.getMonth() - 1, day);
|
||||
switch ($(obj).val()) {
|
||||
case "1":
|
||||
$("#DateValueDate").val(valueDate.format("yyyy-MM-dd"));
|
||||
break;
|
||||
case "2":
|
||||
$("#DateValueDate").val(valueDate.format("yyyy-MM"));
|
||||
break;
|
||||
case "3":
|
||||
$("#DateStartDate").val(valueDate.format("yyyy-MM-dd"));
|
||||
$("#DateEndDate").val(valueDate.format("yyyy-MM-dd"));
|
||||
break;
|
||||
case "4":
|
||||
$("#DateFromValueDate1").val(firstdate.format("yyyy-MM-dd"));
|
||||
$("#DateToValueDate1").val(enddate.format("yyyy-MM-dd"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
//格式化日期
|
||||
Date.prototype.format = function (fmt) {
|
||||
var o = {
|
||||
"M+": this.getMonth() + 1, //月份
|
||||
"d+": this.getDate(), //日
|
||||
"h+": this.getHours(), //小时
|
||||
"m+": this.getMinutes(), //分
|
||||
"s+": this.getSeconds(), //秒
|
||||
};
|
||||
if (/(y+)/.test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
||||
}
|
||||
for (var k in o) {
|
||||
if (new RegExp("(" + k + ")").test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
<div class="searchdiv">
|
||||
<label class="control-label name-input" for="formGroupInputLarge">报告类型</label>
|
||||
<select class="select" id="DataSource" onchange="DataSourceChange(this)">
|
||||
@Html.Raw(GlobalData.GetOptions(pageObj.reportTypeInfos.Select(a => new SelectListItem { Text = a.Key, Value = a.Value + "" })));
|
||||
</select>
|
||||
<div tag="1">
|
||||
@Html.SearchDate("ValueDate", "日期")
|
||||
</div>
|
||||
<div tag="2">
|
||||
@Html.ShortInput("ValueMonthly", "月份")
|
||||
</div>
|
||||
<div tag="3">
|
||||
@Html.SearchDate("StartDate", "开始日期")@Html.SearchDate("EndDate", "结束日期")
|
||||
</div>
|
||||
<div tag="4" class="d-inline-block">
|
||||
@Html.SearchDateRange("ValueDate1", "发生时间")
|
||||
@Html.MyAceDropdownInput("ClientId", "客户名称", CurUser.GetClientSelectItems(),false)
|
||||
</div>
|
||||
@MyControls.Btn("导出", "exportToFile()")
|
||||
<div class="searchdiv">
|
||||
<label class="control-label name-input" for="formGroupInputLarge">报告类型</label>
|
||||
<select class="select" id="DataSource" onchange="DataSourceChange(this)">
|
||||
@Html.Raw(GlobalData.GetOptions(pageObj.reportTypeInfos.Select(a => new SelectListItem { Text = a.Key, Value = a.Value + "" })));
|
||||
</select>
|
||||
<div tag="1">
|
||||
@Html.SearchDate("ValueDate", "日期")
|
||||
</div>
|
||||
<div tag="2">
|
||||
<label class="search-label" for="ValueMonthly">月份</label>
|
||||
<select class="select" id="ValueMonthly">
|
||||
@{
|
||||
for (var i = 0; i < 6; i++)
|
||||
{
|
||||
var date = DateTime.Now.AddMonths(-i);
|
||||
<option value="@(date.ToString("yyyy-MM"))" @(i == 1 ? "selected" : "")>@(date.ToString("yyyy-MM"))</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div tag="3">
|
||||
@Html.SearchDate("StartDate", "开始日期")@Html.SearchDate("EndDate", "结束日期")
|
||||
</div>
|
||||
@MyControls.Btn("导出", "exportToFile()")
|
||||
</div>
|
||||
|
||||
@@ -106,6 +106,9 @@
|
||||
<None Update="App_Docs\导出模板\互换开平仓事件流水导出模板.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="App_Docs\导出模板\月报基础数据债券收益互换.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="App_Docs\导出模板\浮动利率默认设置导出模板.xlsx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"ylcms": "server=221.229.106.161;uid=roottest;pooling=true;port=20306;pwd=YieldChain!@#$2020;database=yltrs_ylcms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"yladmin": "server=221.229.106.161;uid=roottest;pooling=true;port=20306;pwd=YieldChain!@#$2020;database=yltrs_admin;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"ylclient": "server=221.229.106.161;uid=roottest;pooling=true;port=20306;pwd=YieldChain!@#$2020;database=yltrs_client;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"bondoms": "server=221.229.106.161;uid=roottest;pooling=true;port=20306;pwd=YieldChain!@#$2020;database=bond_oms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"apex_oracle": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=122.112.205.57)(PORT=11521)))(CONNECT_DATA=(SERVICE_NAME=xe)));User ID=system;Password=oracle;"
|
||||
"ylcms": "server=192.168.2.96;uid=DBAdmin;pooling=true;port=3306;pwd=YieldChain$$2025;database=zszq_yltrs_ylcms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"yladmin": "server=192.168.2.96;uid=DBAdmin;pooling=true;port=3306;pwd=YieldChain$$2025;database=zszq_yltrs_admin;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"ylclient": "server=192.168.2.96;uid=DBAdmin;pooling=true;port=3306;pwd=YieldChain$$2025;database=zszq_yltrs_client;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"bondoms": "server=192.168.2.96;uid=DBAdmin;pooling=true;port=3306;pwd=YieldChain$$2025;database=zszq_bond_oms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;"
|
||||
},
|
||||
"AppSettings": {
|
||||
"VirtualPathRoot": "",
|
||||
@@ -66,9 +65,10 @@
|
||||
"YiLian_SwapFlowGroup": "YiLian_SwapFlowGroup" //交易端同步流水消费组
|
||||
},
|
||||
"BondOmsInterface": {
|
||||
"BaseUrl": "http://localhost:8887",
|
||||
"BaseUrl": "http://192.168.2.96:10023/trs_hub_api",
|
||||
"CalculateMarginUrl": "/marginAlgorithm/triggerMarginCalc" //
|
||||
},
|
||||
"Reg_Report_Url": "http://192.168.2.96:10025/reg_api/",
|
||||
"OrcaleDatabaseConfig": {
|
||||
"Schema": "APEX_040000"
|
||||
},
|
||||
|
||||
@@ -1,85 +1,86 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"ylcms": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=yltrs_ylcms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"yladmin": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=yltrs_admin;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"ylclient": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=yltrs_client;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"bondoms": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=bond_oms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;"
|
||||
// "apex_oracle": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=122.112.205.57)(PORT=11521)))(CONNECT_DATA=(SERVICE_NAME=xe)));User ID=system;Password=oracle;"
|
||||
},
|
||||
"AppSettings": {
|
||||
"VirtualPathRoot": "",
|
||||
"UseRightAligned": "",
|
||||
"PluginFolder": "D:\\project\\zsza-trs\\Plugins\\build\\ZheShang\\Debug\\net6.0"
|
||||
},
|
||||
"LibreOffice": {
|
||||
"ExePath": "",
|
||||
"UserInstallation": ""
|
||||
},
|
||||
"EPPlus": {
|
||||
"ExcelPackage": {
|
||||
"LicenseContext": "NonCommercial" //The license context used
|
||||
}
|
||||
},
|
||||
"KafkaConfig": {
|
||||
"BootstrapServers": "139.196.109.225:9092", // Kafka 集群的地址
|
||||
"Acks": -1, // 消息确认方式,可以是 All(-1)、Leader(1)、None(0) 中的一种
|
||||
"EnableAutoCommit": false, //是否自动提交
|
||||
"EnableIdempotence": false, // 开启幂等性,确保消息只被发送一次
|
||||
"MaxInFlight": 5, // 控制生产者在同一时间最多可以发送的未确认消息数
|
||||
"CompressionType": 0, // 消息压缩方式,可以是 None(0)、Gzip(1)、Snappy(2)、Lz4(3)、Zstd(4) 中的一种,
|
||||
"MessageTimeoutMs": 3000, // 控制生产者等待消息确认的时间,单位是毫秒
|
||||
"ClientRateTopic": "ylClientRateTopic", //客户互换费率生产topic
|
||||
"HedgingAccountTopic": "ylHedgingAccountTopic", //对冲账户生产topic
|
||||
"AccountCapitalTopicGroupId": "YiLian_OnRspAccountCapitalConsumer", //账户资金消费组
|
||||
"ReqAccountCapitalTopic": "ReqAccountCapital", //账户资金请求topic
|
||||
"OnRspAccountCapitalTopic": "OnRspAccountCapital", //账户资金请求返回topic
|
||||
"AutoOffsetReset": 1, //Latest(0),Earliest(1),Error(2)
|
||||
"EnableCalcBongd": false, //是否启用kafka计算
|
||||
"ReqClientRiskCheckTopic": "YiLian_ReqClientRiskCheck", //客户风控检查
|
||||
"ReqClientRiskCheckConsumerTopic": "YiLian_OnRspClientRiskCheck", //客户风控检查消费者
|
||||
"ReqClientRiskCheckTopicGroupId": "YiLian_ReqClientRiskCheckConsumer1", //客户风控检查消费者
|
||||
"ReqClientMonitorTopic": "YiLian_ReqClientMonitor", //客户资金监控
|
||||
"OnRspClientMonitorConsumerTopic": "YiLian_OnRspClientMonitor", //客户资金监控消费者
|
||||
"ReqClientMonitorTopicGroupId": "YiLian_ReqClientMonitorConsumer1", //客户资金监控消费组
|
||||
"ReqClientMonitorSingleTopic": "YiLian_ReqClientMonitorSingle", //单个客户资金监控
|
||||
"OnRspClientMonitorSingleConsumerTopic": "YiLian_OnRspClientMonitorSingle", //单个客户资金监控
|
||||
"ReqClientMonitorSingleTopicGroupId": "YiLian_ReqClientMonitorSingleConsumer1", //单个客户资金监控
|
||||
"TrsExchangeTradeConsumerTopic": "YiLian_HedgingOrder", //TRS对冲交易消费 topic
|
||||
"TrsExchangeTradeConsumerTopicGroupId": "YiLian_HedgingOrderGroup1", //TRS对冲交易消费 Group
|
||||
"YiLian_ReqHedgingOrderCancelTopic": "YiLian_ReqHedgingOrderCancel", //TRS对冲交易撤单请求消费 topic
|
||||
"YiLian_ReqHedgingOrderCancelTopicGroupId": "YiLian_ReqHedgingOrderCancelGroup1", //TRS对冲交易撤单请求消费 Group
|
||||
"YiLian_RespHedgingOrderCancelTopic": "YiLian_RespHedgingOrderCancel", //TRS对冲交易撤单请求回应 topic
|
||||
"YiLian_ClientInfoChangeTopic": "YiLian_ClientInfoChangeTopic", //客户信息变更通知客户端 topic
|
||||
"YiLian_CashCalcConsumerTopic": "YiLian_CashCalc", //客户资金计算 topic
|
||||
"YiLian_CashCalcConsumerGroup": "YiLian_CashCalcGroup1", //客户资金计算消费组 topic
|
||||
"YiLian_CashNoticeConsumerTopic": "YiLian_CashNotice", //客户资金通知 topic
|
||||
"YiLian_CashNoticeConsumerGroup": "YiLian_CashNoticeGroup", //客户资金通知消费组 topic
|
||||
"YiLian_HolidayResetTopic": "YiLian_HolidayReset", //交易日历缓存重新加载 topic
|
||||
"YiLian_HolidayResetGroupId": "YiLian_HedgingOrderGroup1", //交易日历缓存重新加载消费 Group
|
||||
"YiLian_SwapFlowTopic": "YiLian_SwapFlow", //交易端同步流水
|
||||
"YiLian_SwapFlowGroup": "YiLian_SwapFlowGroup1", //交易端同步流水消费组
|
||||
"YiLian_SysUserInfoChangeTopic": "YiLian_SysUserInfoChangeTopic" //管理端系统用户变更
|
||||
},
|
||||
"BondOmsInterface": {
|
||||
"BaseUrl": "http://trs.yiliantech.com:8080/trs_hub_api"
|
||||
},
|
||||
"OrcaleDatabaseConfig": {
|
||||
"Schema": "APEX_040000"
|
||||
},
|
||||
"SendKafakaCron": "10 0 * * *",
|
||||
"MaxThreadPercent": 0.6, //占系统资源最多60%的线程数量
|
||||
"oa_confg": {
|
||||
"BaseUrl": "http://ip:port",
|
||||
"SystemKey": "M001", //OA系统key
|
||||
"ObjectClass": "ZSZQ_ZDNX", //OA文件类别
|
||||
"Urgent": 1, //紧急程度,1一般 2紧急 3加急
|
||||
"Issend": 1 //流程是否自动发送,0不发送,1自动发送下一步
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"ylcms": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=yltrs_ylcms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"yladmin": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=yltrs_admin;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"ylclient": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=yltrs_client;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;",
|
||||
"bondoms": "server=139.196.109.225;uid=root;pooling=true;port=3306;pwd=Midnight001!@#$;database=bond_oms;charset=utf8;Allow User Variables=True;SslMode=none;Connection Timeout=30;IgnoreCommandTransaction=true;"
|
||||
// "apex_oracle": "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=122.112.205.57)(PORT=11521)))(CONNECT_DATA=(SERVICE_NAME=xe)));User ID=system;Password=oracle;"
|
||||
},
|
||||
"AppSettings": {
|
||||
"VirtualPathRoot": "",
|
||||
"UseRightAligned": "",
|
||||
"PluginFolder": "D:\\project\\zsza-trs\\Plugins\\build\\ZheShang\\Debug\\net6.0"
|
||||
},
|
||||
"LibreOffice": {
|
||||
"ExePath": "",
|
||||
"UserInstallation": ""
|
||||
},
|
||||
"EPPlus": {
|
||||
"ExcelPackage": {
|
||||
"LicenseContext": "NonCommercial" //The license context used
|
||||
}
|
||||
},
|
||||
"KafkaConfig": {
|
||||
"BootstrapServers": "139.196.109.225:9092", // Kafka 集群的地址
|
||||
"Acks": -1, // 消息确认方式,可以是 All(-1)、Leader(1)、None(0) 中的一种
|
||||
"EnableAutoCommit": false, //是否自动提交
|
||||
"EnableIdempotence": false, // 开启幂等性,确保消息只被发送一次
|
||||
"MaxInFlight": 5, // 控制生产者在同一时间最多可以发送的未确认消息数
|
||||
"CompressionType": 0, // 消息压缩方式,可以是 None(0)、Gzip(1)、Snappy(2)、Lz4(3)、Zstd(4) 中的一种,
|
||||
"MessageTimeoutMs": 3000, // 控制生产者等待消息确认的时间,单位是毫秒
|
||||
"ClientRateTopic": "ylClientRateTopic", //客户互换费率生产topic
|
||||
"HedgingAccountTopic": "ylHedgingAccountTopic", //对冲账户生产topic
|
||||
"AccountCapitalTopicGroupId": "YiLian_OnRspAccountCapitalConsumer", //账户资金消费组
|
||||
"ReqAccountCapitalTopic": "ReqAccountCapital", //账户资金请求topic
|
||||
"OnRspAccountCapitalTopic": "OnRspAccountCapital", //账户资金请求返回topic
|
||||
"AutoOffsetReset": 1, //Latest(0),Earliest(1),Error(2)
|
||||
"EnableCalcBongd": false, //是否启用kafka计算
|
||||
"ReqClientRiskCheckTopic": "YiLian_ReqClientRiskCheck", //客户风控检查
|
||||
"ReqClientRiskCheckConsumerTopic": "YiLian_OnRspClientRiskCheck", //客户风控检查消费者
|
||||
"ReqClientRiskCheckTopicGroupId": "YiLian_ReqClientRiskCheckConsumer1", //客户风控检查消费者
|
||||
"ReqClientMonitorTopic": "YiLian_ReqClientMonitor", //客户资金监控
|
||||
"OnRspClientMonitorConsumerTopic": "YiLian_OnRspClientMonitor", //客户资金监控消费者
|
||||
"ReqClientMonitorTopicGroupId": "YiLian_ReqClientMonitorConsumer1", //客户资金监控消费组
|
||||
"ReqClientMonitorSingleTopic": "YiLian_ReqClientMonitorSingle", //单个客户资金监控
|
||||
"OnRspClientMonitorSingleConsumerTopic": "YiLian_OnRspClientMonitorSingle", //单个客户资金监控
|
||||
"ReqClientMonitorSingleTopicGroupId": "YiLian_ReqClientMonitorSingleConsumer1", //单个客户资金监控
|
||||
"TrsExchangeTradeConsumerTopic": "YiLian_HedgingOrder", //TRS对冲交易消费 topic
|
||||
"TrsExchangeTradeConsumerTopicGroupId": "YiLian_HedgingOrderGroup1", //TRS对冲交易消费 Group
|
||||
"YiLian_ReqHedgingOrderCancelTopic": "YiLian_ReqHedgingOrderCancel", //TRS对冲交易撤单请求消费 topic
|
||||
"YiLian_ReqHedgingOrderCancelTopicGroupId": "YiLian_ReqHedgingOrderCancelGroup1", //TRS对冲交易撤单请求消费 Group
|
||||
"YiLian_RespHedgingOrderCancelTopic": "YiLian_RespHedgingOrderCancel", //TRS对冲交易撤单请求回应 topic
|
||||
"YiLian_ClientInfoChangeTopic": "YiLian_ClientInfoChangeTopic", //客户信息变更通知客户端 topic
|
||||
"YiLian_CashCalcConsumerTopic": "YiLian_CashCalc", //客户资金计算 topic
|
||||
"YiLian_CashCalcConsumerGroup": "YiLian_CashCalcGroup1", //客户资金计算消费组 topic
|
||||
"YiLian_CashNoticeConsumerTopic": "YiLian_CashNotice", //客户资金通知 topic
|
||||
"YiLian_CashNoticeConsumerGroup": "YiLian_CashNoticeGroup", //客户资金通知消费组 topic
|
||||
"YiLian_HolidayResetTopic": "YiLian_HolidayReset", //交易日历缓存重新加载 topic
|
||||
"YiLian_HolidayResetGroupId": "YiLian_HedgingOrderGroup1", //交易日历缓存重新加载消费 Group
|
||||
"YiLian_SwapFlowTopic": "YiLian_SwapFlow", //交易端同步流水
|
||||
"YiLian_SwapFlowGroup": "YiLian_SwapFlowGroup1", //交易端同步流水消费组
|
||||
"YiLian_SysUserInfoChangeTopic": "YiLian_SysUserInfoChangeTopic" //管理端系统用户变更
|
||||
},
|
||||
"BondOmsInterface": {
|
||||
"BaseUrl": "http://trs.yiliantech.com:8080/trs_hub_api"
|
||||
},
|
||||
"Reg_Report_Url": "http://139.196.109.225:8889",//报送后端地址
|
||||
"OrcaleDatabaseConfig": {
|
||||
"Schema": "APEX_040000"
|
||||
},
|
||||
"SendKafakaCron": "10 0 * * *",
|
||||
"MaxThreadPercent": 0.6, //占系统资源最多60%的线程数量
|
||||
"oa_confg": {
|
||||
"BaseUrl": "http://ip:port",
|
||||
"SystemKey": "M001", //OA系统key
|
||||
"ObjectClass": "ZSZQ_ZDNX", //OA文件类别
|
||||
"Urgent": 1, //紧急程度,1一般 2紧急 3加急
|
||||
"Issend": 0 //流程是否自动发送,0不发送,1自动发送下一步
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,5 +73,12 @@
|
||||
"Schema": "YILIAN"
|
||||
},
|
||||
"SendKafakaCron": "10 0 * * *",
|
||||
"MaxThreadPercent": 0.6 //占系统资源最多60%的线程数量
|
||||
"MaxThreadPercent": 0.6, //占系统资源最多60%的线程数量
|
||||
"oa_confg": {
|
||||
"BaseUrl": "http://10.52.130.11",
|
||||
"SystemKey": "fF2U9HXs7dm6Hjz5X", //OA系统key
|
||||
"ObjectClass": "ZSZQ_CWYSPJYQRSDZWF", //OA文件类别
|
||||
"Urgent": 1, //紧急程度,1一般 2紧急 3加急
|
||||
"Issend": 0 //流程是否自动发送,0不发送,1自动发送下一步
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
const cardInputMgr = (new function () {
|
||||
var winloss = 0; // 已实现盈亏
|
||||
var netFund = 0; // 初保账户
|
||||
var vmFund = 0; // 追保账户
|
||||
var transferOutMoney = 0; // 转出金额
|
||||
const cardInputMgr = (new function () {
|
||||
|
||||
var _inited = 0, _inputFlag = 0;
|
||||
|
||||
@@ -180,7 +184,18 @@ function checkSubmitData() {
|
||||
else {
|
||||
$("#Money").val($("#Money").val().replace(',', ''));
|
||||
}
|
||||
|
||||
let direction = $("#Direction").val();
|
||||
if (direction==="划转") {
|
||||
var transfer_out_account = $("#TransferOutAccount").val();
|
||||
var transfer_in_account = $("#TransferInAccount").val();
|
||||
if (transfer_out_account === transfer_in_account) {
|
||||
return main.message("转出科目与转入科目不能相同!");
|
||||
}
|
||||
var money = parseFloat($("#Money").val());
|
||||
if (money <=0) {
|
||||
return main.message("转出金额必须大于0!");
|
||||
}
|
||||
}
|
||||
return cardInputMgr.checkSubmit();
|
||||
}
|
||||
|
||||
@@ -205,16 +220,30 @@ function setDirection(isInit) {
|
||||
!isInit && cardInputMgr.changeInputType(true);
|
||||
let direction = $("#Direction").val();
|
||||
$(".changeInputBtn").toggleClass("hide", ["出金", "应付"].includes(direction));
|
||||
if (direction === "出金") {
|
||||
$("#cash_type_container").hide(); // 隐藏资金类型
|
||||
} else {
|
||||
if (direction === "入金") {
|
||||
$("#cash_type_container").show(); // 显示资金类型
|
||||
} else {
|
||||
$("#cash_type_container").hide(); // 隐藏资金类型
|
||||
}
|
||||
if (direction === "划转") {
|
||||
$("#transfer_out_container").show();
|
||||
$("#transfer_in_container").show();
|
||||
$("#transferAll").show();
|
||||
} else {
|
||||
$("#transfer_out_container").hide();
|
||||
$("#transfer_in_container").hide();
|
||||
$("#transferAll").hide();
|
||||
}
|
||||
cardInputMgr.toggle(["入金", "出金"].includes(direction));
|
||||
|
||||
cardInputMgr.updateOptions();
|
||||
}
|
||||
|
||||
// 全部转出
|
||||
function transferAll() {
|
||||
$("#MoneyStr").val(transferOutMoney);
|
||||
moneyInputMgr.onInput();
|
||||
}
|
||||
function setClientCash() {
|
||||
var clientId = $("#ClientId").val();
|
||||
if (!clientId) {
|
||||
@@ -225,9 +254,49 @@ function setClientCash() {
|
||||
$("#ClientCashCNY").val(res.CNY);
|
||||
$("#ClientCashUSD").val(res.USD);
|
||||
}
|
||||
})
|
||||
});
|
||||
main.post("/trade_span/GetClientLatestBalance", { clientId: clientId }).done(function (data) {
|
||||
winloss = numFormart(data.WinLoss);
|
||||
netFund = numFormart(data.NetFund);
|
||||
vmFund = numFormart(data.VmFundSum);
|
||||
setTransferMoney();
|
||||
});
|
||||
}
|
||||
function setTransferMoney() {
|
||||
var clientId = $("#ClientId").val();
|
||||
if (!clientId) {
|
||||
return;
|
||||
}
|
||||
var transfer_out_account = $("#TransferOutAccount").val();
|
||||
var transfer_in_account = $("#TransferInAccount").val();
|
||||
if (transfer_out_account === "初保账户") {
|
||||
transferOutMoney = netFund;
|
||||
$("#transfer_out_account_money").text("余额:" + netFund);
|
||||
}
|
||||
else if (transfer_out_account === "追保账户") {
|
||||
transferOutMoney = vmFund;
|
||||
$("#transfer_out_account_money").text("余额:" + vmFund);
|
||||
} else {
|
||||
transferOutMoney = winloss;
|
||||
$("#transfer_out_account_money").text("余额:" + winloss);
|
||||
}
|
||||
if (transfer_in_account === "初保账户") {
|
||||
$("#transfer_in_account_money").text("余额:" + netFund);
|
||||
}
|
||||
else if (transfer_in_account === "追保账户") {
|
||||
$("#transfer_in_account_money").text("余额:" + vmFund);
|
||||
} else {
|
||||
$("#transfer_in_account_money").text("余额:" + winloss);
|
||||
}
|
||||
}
|
||||
function numFormart(num) {
|
||||
num = num || 0;
|
||||
var result = numeral(num).format("0,0.00") === "NaN" ? "0.00" : numeral(num).format("0,0.00");
|
||||
if (result === "-0.00") {
|
||||
result = "0.00";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
cardInputMgr.init();
|
||||
|
||||
@@ -1155,6 +1155,10 @@ var vue = new Vue({
|
||||
this.swapflow.ClientId = client.id;
|
||||
this.swapflow.ClientName = client.Name;
|
||||
},
|
||||
//变更标的单价
|
||||
changeSpotPrice() {
|
||||
this.swapflow.TradingAmount = main.toNumber(this.swapflow.TradingAmountAvg * this.swapflow.TradingQty * this.swapflow.ContractSize*100, 2);
|
||||
},
|
||||
deleteSwapflow(id, st) {
|
||||
main.confirm("确定要删除吗?", function () {
|
||||
main.post("/swaptrade2/DeleteSwapflow?enid=" + id + "&step=" + st).done(function (resp) {
|
||||
|
||||
@@ -37,16 +37,16 @@ const colModelGrid = (new function () {
|
||||
return html;
|
||||
}
|
||||
},
|
||||
// { label: 'OA状态', name: 'OAStatus', width: 100, align: 'center' },
|
||||
//{ label: 'OA-URL', name: 'OAURL', width: 150, align: 'center',
|
||||
// formatter: function (cellValue, options, rowObject) {
|
||||
// if (cellValue && cellValue.length > 0) {
|
||||
// return '<a href="' + cellValue + '" target="_blank">查看</a>';
|
||||
// }
|
||||
// return '';
|
||||
// }
|
||||
//},
|
||||
//{ label: 'OA消息', name: 'OAMessage', width: 150, align: 'left' },
|
||||
{ label: 'OA状态', name: 'OAStatus', width: 100, align: 'center' },
|
||||
{ label: 'OA-URL', name: 'OAURL', width: 150, align: 'center',
|
||||
formatter: function (cellValue, options, rowObject) {
|
||||
if (cellValue && cellValue.length > 0) {
|
||||
return '<a href="' + cellValue + '" target="_blank">查看</a>';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{ label: 'OA消息', name: 'OAMessage', width: 150, align: 'left' },
|
||||
{ label: '交易数量', name: 'tradeCount', width: 80, align: 'center' },
|
||||
{ label: 'tradeIds', name: 'tradeIds', hidden: true, optionHide: true }];
|
||||
this.upload = function (encryptId, sendMail) {
|
||||
@@ -166,7 +166,7 @@ $(function () {
|
||||
// $("#batchSendMailBtn").click(BatchSendMail);
|
||||
initJqGrid();
|
||||
SendEmailHub()
|
||||
// SendOAHub(); // 初始化OA发送功能
|
||||
SendOAHub(); // 初始化OA发送功能
|
||||
});
|
||||
|
||||
// 初始化jqGrid函数
|
||||
@@ -259,8 +259,8 @@ function showToolName(cellValue, options, rowObject) {
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" value=\"上传\" onclick=\"colModelGrid.uploadNew('{0}')\" {1} />".template(rowObject.ContractCode, canUpload);
|
||||
|
||||
// 添加发送OA按钮
|
||||
//html += "<input type=\"button\" class=\"wentiEdit\" title='发送交易确认书到OA系统' onclick=\"sendOA('{0}')\" value=\"发送OA\" />"
|
||||
// .template(rowObject.id);
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" title='发送交易确认书到OA系统' onclick=\"sendOA('{0}')\" value=\"发送OA\" />"
|
||||
.template(rowObject.id);
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user