chore(swap): 删除Admin后台区域与前端死文件——Areas/Admin整区(6控制器17视图,用户确认无人使用,主站零入口链接,/front/clientEditConfig由FrontController直走Service与该区无关,配置编辑界面移除但底层Service与DB配置不动)+Scripts/admin;jquery-3.6.0三件套(拷贝当天即零引用,运行时一直用Statics/libs 3.5.1);3个业务死JS(TradeMarketReport_DmaEodPosition/UserDefinedStructure/forwardTradeMarginCost,含Areas/App_Data语料双重复核);11个死视图(supervise2022副本3个/Picktrade两个/申万PDF模板等,渲染通道全代码内零命中);NCrontab.Signed零使用死包。client下划线3个partial因走DB配置viewPath通道待查库未删

This commit is contained in:
hjhan
2026-08-22 10:18:26 +08:00
parent 5436a88657
commit d42742ab10
51 changed files with 0 additions and 17924 deletions
-17
View File
@@ -1,17 +0,0 @@
namespace YLErp.Web.Areas.Admin
{
public static class AdminContext
{
public static string AdminAuthValue { get; private set; }
static AdminContext()
{
AdminAuthValue = Guid.NewGuid().ToString("N");
}
public static string NewAdminCookieValue()
{
return AdminAuthValue = Guid.NewGuid().ToString("N");
}
}
}
@@ -1,152 +0,0 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc.Filters;
using System.Text;
using YieldChain.Models;
namespace YLErp.Web.Areas.Admin.Controllers
{
[Authorize(policy: "yc_identity"), Area("Admin")]
public abstract class AdminBaseController : Controller
{
/// <summary>
/// JSON序列化时是否包括NULL值
/// </summary>
protected virtual bool JsonIncludeNullValue { get; set; }
#region ----HTTP响应----
/// <summary>
/// 返回JSON错误信息
/// </summary>
protected JsonResult JsonError(string errmsg)
{
return JsonResp(1, errmsg);
}
/// <summary>
/// 返回JSON错误信息
/// </summary>
protected JsonResult JsonError(string errmsg, bool locale)
{
if (locale)
{
return JsonResp(1, errmsg);
}
return Json(new ApiResponseModel(1, errmsg));
}
/// <summary>
/// 返回JSON错误信息
/// </summary>
protected JsonResult JsonError(int errcode, string errmsg)
{
return JsonResp(errcode, errmsg);
}
/// <summary>
/// 返回JSON成功信息
/// </summary>
protected JsonResult JsonSuccess(object resultData, string message = null)
{
return JsonResp(0, message, resultData);
}
/// <summary>
/// 返回JSON格式的成功消息
/// </summary>
protected JsonResult JsonSuccess()
{
return Json(new ApiResponseModel(0));
}
/// <summary>
/// 返回JSON格式的成功消息
/// </summary>
protected JsonResult JsonSuccessMessage(string message)
{
return JsonResp(0, message);
}
/// <summary>
/// 返回JSON格式的模型验证失败
/// </summary>
protected JsonResult JsonModelError(string separator = "\\n\\n")
{
var sb = new StringBuilder();
foreach (var item in ModelState.Values)
{
if (item.Errors.Count > 0)
{
for (var i = item.Errors.Count - 1; i >= 0; i--)
{
if (sb.Length > 0)
{
sb.Append(separator);
}
sb.Append(item.Errors[i].ErrorMessage);
}
}
}
return JsonResp(2, sb.ToString());
}
/// <summary>
/// 返回JSON格式的消息
/// </summary>
/// <param name="errcode">0-无错误,其他-有错误发生</param>
/// <param name="message">错误或成功消息</param>
/// <param name="resultData">结果数据</param>
protected JsonResult JsonResp(int errcode, string message, object resultData = null)
{
return Json(new ApiResponseModel(errcode, message, resultData));
}
#endregion
UserInfo _curUser;
protected UserInfo CurUser
{
get
{
if (User.Identity.IsAuthenticated)
{
if (_curUser != null)
{
return _curUser;
}
_curUser = Server.CacheProvider.Get("loginUser^" + HttpContext.User.GetUserId()) as UserInfo;
if (_curUser != null)
{
_curUser.UserFrom = OptUserFrom.WebUI;
return _curUser;
}
}
return new UserInfo { UserName = "系统", UserFrom = OptUserFrom.WebUI };
}
}
public override void OnActionExecuting(ActionExecutingContext context)
{
if (!CurUser.HasRight("系统管理-系统配置管理"))
{
if (Request.Headers["X-Requested-With"] == "XMLHttpRequest")
{
context.Result = JsonError("没有权限");
}
else
{
context.Result = new ContentResult { Content = "您无权访问此页面。", ContentType = "text/plain; charset=utf-8" };
}
}
base.OnActionExecuting(context);
}
}
}
@@ -1,42 +0,0 @@
using YLErp.Modules.AppModule.UpgradModule;
namespace YLErp.Web.Areas.Admin.Controllers
{
public class DbUpdateController : AdminBaseController
{
public ActionResult Index()
{
return View();
}
/// <summary>
/// 加载所有数据库脚本升级列表
/// </summary>
public JsonResult AjaxGetUpdateList()
{
var list = DbUpdateService.GetUpdateList();
return JsonSuccess(list);
}
/// <summary>
/// 查看数据库脚本升级内容
/// </summary>
public JsonResult AjaxGetUpdateContent(IEnumerable<string> upKeyList)
{
var content = DbUpdateService.GetUpdateContent(upKeyList);
return JsonSuccess(content);
}
/// <summary>
/// 执行所选数据库脚本升级文件内容
/// </summary>
public JsonResult AjaxExecuteUpdate(IEnumerable<string> upKeyList, bool isUpdateDone = false)
{
var responseDtos = DbUpdateService.ExecuteUpdate(upKeyList, isUpdateDone);
return JsonSuccess(responseDtos);
}
}
}
@@ -1,32 +0,0 @@
using YLErp.Providers;
namespace YLErp.Web.Areas.Admin.Controllers
{
public class HomeController : AdminBaseController
{
public ActionResult Index()
{
return View();
}
public ActionResult Logout()
{
MemoryCacheProvider.Default.Remove("myadminadmin");
return Redirect("/admin/Login");
}
public JsonResult AjaxRestart()
{
try
{
System.Diagnostics.Process.GetCurrentProcess().Kill();
return Json("重启中...");
}
catch (Exception ex)
{
return Json("重启失败:" + ex.Message);
}
}
}
}
@@ -1,290 +0,0 @@
using Newtonsoft.Json;
using Org.BouncyCastle.Asn1.Ocsp;
using YLErp.Commons;
using YLErp.Modules.AppModule;
using YLErp.Modules.EodModule.SettlementModule;
using YLErp.Web.App_Start.AppConfig;
using YLErp.Web.Areas.Admin.Models;
namespace YLErp.Web.Areas.Admin.Controllers
{
public class OtcConfigController : AdminBaseController
{
public ActionResult Index()
{
return AppConfig();
}
#region----AppConfig----
public ActionResult AppConfig()
{
var datas = DbContextFactory.GetYLDbContext().AppConfig.Where(n => n.PGroup == "ProjectConfig").ToArray();
foreach (var data in datas)
{
if (data.PType == "string")
{
data.PGroup = "01";
}
else if (data.PType == "text")
{
data.PGroup = "01";
}
else if (data.PType == "bool")
{
data.PGroup = "11";
}
else
{
data.PGroup = "02";
}
}
datas = datas.OrderBy(n => n.PGroup).ThenBy(n => n.PName).ToArray();
return View("AppConfig", datas);
}
public JsonResult AjaxSaveAppConfig(string name, string value)
{
if (string.IsNullOrEmpty(name))
{
return JsonError("保存失败,请求参数不能为空");
}
if (!string.IsNullOrWhiteSpace(value))
{
value = Uri.UnescapeDataString(value);
}
using (var db = DbContextFactory.GetYLDbContext())
{
var data = db.AppConfig.FirstOrDefault(n => n.PGroup == "ProjectConfig" && n.PName == name);
if (data == null)
{
return JsonError("保存失败,没有找到配置数据");
}
data.PValue = value;
PS.SetConfig(name, value);
db.SaveChanges();
return JsonSuccess($"{DateTime.Now:yyyyMMdd HH:mm:ss}--保存成功--{data.PName}={data.PValue}");
}
}
public JsonResult AjaxResetAppConfig()
{
AppManager.ResetAppConfig();
return JsonSuccess("刷新配置成功");
}
#endregion
#region----OtcWebConfig---
public ActionResult WebConfig()
{
var list = AppHelper.GetConfigFieldAttributes();
return View(list);
}
public JsonResult AjaxSaveWebConfig(OtcAppConfig model)
{
if (model == null)
{
return JsonError("请求参数无效");
}
var json = JsonHelper.Serialize(model);
AppHelper.ResetConfig(json);
return JsonSuccess();
}
#endregion
#region----OtcFormat----
public ActionResult OtcFormat()
{
var viewModel = OtcFormatViewModel.CreateViewModel(OtcFormatHelper.FormatModel);
return View(viewModel);
}
/// <summary>
/// 保存配置
/// </summary>
/// <remarks>
/// 保存链路:写 DB(AppConfig.OtcFormatConfig) → 落盘 App_Data/Config/otcformat.js → 刷新内存。
/// 注意:File.WriteAllText 只写当前节点磁盘。多节点部署下,未处理本次请求的节点文件不会更新,
/// 会造成"DB 正确但 /front/otcformat 返回旧值"。完整排查见 FrontController 类注释。
/// </remarks>
public JsonResult AjaxSaveOtcFormat(OtcFormatModel model)
{
if (model is null)
{
return JsonError("参数不能为空");
}
var json = JsonConvert.SerializeObject(model, Formatting.Indented);
var service = new AppConfigService(OptUserInfo.SystemUser);
service.SaveOtcFormatConfig(json);
var path = Server.MapPath("~/App_Data/Config/otcformat.js");
var jscode = "var main = main || {};\r\nmain.formatOptions= " + json + ";\r\n\r\n";
System.IO.File.WriteAllText(path, jscode);
OtcFormatHelper.Initialize(json);
return JsonSuccess();
}
#endregion
#region---SMTP Config----
public ActionResult SmtpConfig()
{
return View(AppManager.SmtpConfig);
}
/// <summary>
/// 保存邮件发送配置
/// </summary>
public JsonResult AjaxSaveSmtpConfig(SmtpConfigExt smtpConfig)
{
AppManager.ResetSmtpConfig(smtpConfig);
return JsonSuccessMessage("保存成功");
}
/// <summary>
/// 邮件发送测试
/// </summary>
public JsonResult AjaxSendMailTest(string mailTo)
{
if (string.IsNullOrWhiteSpace(mailTo))
{
return JsonError("发送邮件地址不能为空");
}
LogFactory.GetLogger().Info($"邮件发送测试,mailTo={mailTo}");
var error = EmailHelper.SendMail(mailTo, "邮件发送测试", "邮件发送测试");
LogFactory.GetLogger().Info($"邮件发送测试完成,mailTo={mailTo},error={error}");
if (string.IsNullOrWhiteSpace(error))
{
return JsonSuccess();
}
return JsonError(error);
}
#endregion
#region----MailTemplate----
public ActionResult MailTemplate()
{
return View();
}
public JsonResult AjaxGetMailTemplate(string emailType)
{
var data = new EmailTemplateService(CurUser).GetData(emailType);
return JsonSuccess(data ?? new EmailTemplate());
}
public JsonResult AjaxSaveMailTemplate(EmailTemplate data)
{
data.IsBodyHtml = true;
data.BodyTemplate = Uri.UnescapeDataString(data.BodyTemplate ?? string.Empty);
new EmailTemplateService(CurUser).SaveData(data);
return JsonSuccess("保存成功");
}
#endregion
#region--------
public ActionResult SettlementConfig()
{
var config = PS.Config.GetSettlementConfig();
return View(config);
}
public JsonResult AjaxSaveSettlementConfig(Configuration.SettlementConfig config)
{
var json = config.ToJson();
new AppConfigService(CurUser).SaveConfig("ProjectConfig", "Erp.SettlementConfig", json, "string", "收盘配置");
PS.SetConfig("Erp.SettlementConfig", json);
return JsonSuccess();
}
/// <summary>
/// 客户资金分买卖权结算重算
/// </summary>
/// <returns></returns>
public JsonResult AjaxClientBalanceReCalcBS(BalanceRecalcBSRequest request)
{
Task.Run(() => new EodClientBalanceCalcBS(CurUser).ClientBalanceReCalc(request.TradeDateStart,request.TradeDateEnd));
return JsonSuccess();
}
public JsonResult AjaxClientBalanceReCalcProcess()
{
EodClientBalanceCalcBS.thQueue.TryPeek(out EodClientBalanceReCalcModel result);//取出最新进度
return JsonSuccess(result);
}
#endregion
#region--------
public ActionResult Logout()
{
return Redirect("/admin/Login");
}
#endregion
#region--------
public ActionResult TradePricingCfg()
{
return View();
}
#endregion
#region----ClientEditConfig----
public ActionResult ClientEditConfig()
{
ViewData["config"] = YLErp.Modules.SystemModule.ClientEditConfigService.GetCurrentConfigJson();
return View();
}
public ActionResult downClientEditConfig(string t)
{
string configJson;
if ("def".Equals(t, StringComparison.OrdinalIgnoreCase))
{
configJson = YLErp.Modules.SystemModule.ClientEditConfigService.GetDefaultConfigJson();
}
else
{
configJson = YLErp.Modules.SystemModule.ClientEditConfigService.GetCurrentConfigJson();
}
var buffer = System.Text.Encoding.UTF8.GetBytes(configJson);
return File(buffer, "application/javascript; charset=utf-8", "clientEditConfig.js");
}
public JsonResult AjaxSaveClientEditConfig(string config)
{
YLErp.Modules.SystemModule.ClientEditConfigService.SaveEditConfig(config);
return JsonSuccess();
}
#endregion
#region--------
public ActionResult TradeMarketReportCfg()
{
return View();
}
#endregion
}
}
@@ -1,42 +0,0 @@
using YLErp.Modules.ReportModule;
namespace YLErp.Web.Areas.Admin.Controllers
{
public class OwnerInfoController : AdminBaseController
{
// GET: Admin/Owner_info
public ActionResult Index()
{
return View();
}
public JsonResult GetOwnerInfo()
{
var sList = DbContextFactory.GetYLDbContext().Owner_Info.ToList();
return Json(sList);
}
public JsonResult PostOwnerInfo(Owner_info o)
{
var i = new Owner_infoService(CurUser).AddOrUpdate(o);
return Json(i);
}
public ActionResult OwnerInfoEdit(int ID)
{
Owner_info v;
v = DbContextFactory.GetYLDbContext().Owner_Info.Find(ID);
if (v == null)
{
v = new Owner_info();
}
return View(v);
}
public JsonResult Deleteowner(int ID)
{
var i = new Owner_infoService(CurUser).Dele(ID);
return Json(i);
}
}
}
@@ -1,70 +0,0 @@
using YLErp.Modules.ExchangeTradeModule;
using YLErp.Modules.SuperviseReportModule.ChangJiangReport.Service;
using YLErp.Modules.SystemModule;
namespace YLErp.Web.Areas.Admin.Controllers
{
public class ToolsController : AdminBaseController
{
public ActionResult Index()
{
return View();
}
/// <summary>
/// 重新初始化实时风险计算
/// </summary>
public JsonResult AjaxResetTradeRiskCalcTaskRunner()
{
Modules.TradeRiskCalcModule.TradeRiskCalcTaskRunner.Reset();
return JsonSuccess();
}
/// <summary>
/// 重置对冲交易持仓
/// </summary>
public JsonResult AjaxResetTradePosition()
{
new ExchangeTradePositionService(CurUser).ResetExchangeTradePosition();
return JsonSuccess();
}
public JsonResult AjaxResetsysUser()
{
var functionRightXmlFilePath = Server.MapPath("/App_Data/FunctionRight.xml");
new SysFunctionService(CurUser).SyncFunctionRight(functionRightXmlFilePath);
BaseOUDAL.UserBLL.AddDefaultUser();
FunctionHelper.Initialize();
return JsonSuccess();
}
/// <summary>
/// 长江监管报告-场外业务持仓表
/// </summary>
public JsonResult AjaxChangeJiangSuperviseReportPosition(ChangeJiangSuperviseReportPositionRequest req)
{
if (req == null)
{
return JsonError("参数不可为空");
}
if (req.Date == DateTime.MinValue)
{
return JsonError("未传入有效的结算日期");
}
var nv = YieldChain.Helpers.UrlHelper.ParseQueryString(PS.Config.ErpElement.Supervise_Position);
var changes = new SuperviseReportPositionService(OptUserInfo.SystemUser).SaveReportData(req.Date.Date, nv?["敞口算法"], req.ClearExistings);
return JsonSuccessMessage($"执行完成,共更新{changes}条");
}
}
public class ChangeJiangSuperviseReportPositionRequest
{
public DateTime Date { get; set; }
public bool ClearExistings { get; set; }
}
}
@@ -1,9 +0,0 @@
namespace YLErp.Web.Areas.Admin.Models
{
public class BalanceRecalcBSRequest
{
public DateTime? TradeDateStart { get; set; }
public DateTime? TradeDateEnd { get; set; }
}
}
@@ -1,60 +0,0 @@
using System.Reflection;
namespace YLErp.Web.Areas.Admin.Models
{
/// <summary>
///
/// </summary>
public class OtcFormatViewModel
{
public IEnumerable<SelectItemNest> SelectItems { get; set; }
public static OtcFormatViewModel CreateViewModel(OtcFormatModel otcFormat)
{
if (otcFormat is null)
{
throw new System.ArgumentNullException(nameof(otcFormat));
}
var selectItems = GetSelectItems(otcFormat);
return new OtcFormatViewModel { SelectItems = selectItems };
}
private static IEnumerable<SelectItemNest> GetSelectItems(object obj, int depth = 0)
{
var flags = BindingFlags.Instance | BindingFlags.Public;
var properties = obj.GetType().GetProperties(flags);
var resultList = new List<SelectItemNest>(properties.Length);
foreach (var p in properties)
{
if (p.CanRead && p.CanWrite)
{
var attr = p.GetCustomAttribute(typeof(OtcFormatConfigAttribute)) as OtcFormatConfigAttribute;
if (attr == null)
{
continue;
}
var item = new SelectItemNest
{
Value = p.Name,
Text = attr.Label,
Tag = p.GetValue(obj)
};
if (depth == 0)
{
item.SelectItems = GetSelectItems(item.Tag, depth + 1);
}
resultList.Add(item);
}
}
return resultList;
}
}
}
@@ -1,9 +0,0 @@
namespace YLErp.Web.Areas.Admin.Models
{
public class PluginViewModel
{
public IEnumerable<string> Directories { get; set; }
public IEnumerable<FileInfo> Files { get; set; }
}
}
@@ -1,37 +0,0 @@
using YLErp.Abstract;
namespace YLErp.Web.Areas.Admin.Models
{
public class ZTreeMenuItem : ITreeMenuItem
{
public string id { get; set; }
public string name { get; set; }
public bool open { get; set; }
public List<ZTreeMenuItem> children { get; set; }
public ITreeMenuItem AppendChild(string id, string name, string[] rights,
string url, string icon, string target)
{
var menu = new ZTreeMenuItem
{
id = id,
name = name,
open = false
};
if (children == null)
{
children = new List<ZTreeMenuItem>();
}
children.Add(menu);
return menu;
}
public override string ToString()
{
return name;
}
}
}
@@ -1,94 +0,0 @@
@{
ViewData["Title"] = "数据库升级";
}
<div class="card" id="dbUpdateDiv">
<div class="card-header">
<h4 class="card-title">数据库升级</h4>
<button class="btn btn-primary ml-2" v-on:click="executeUpdate()">批量执行</button>
<button class="btn btn-primary ml-2" v-on:click="executeUpdate('isUpdateDone')">批量更新为已执行</button>
<button class="btn btn-primary ml-2" v-on:click="viewUpdateContent()">查看升级内容</button>
<button class="btn btn-primary ml-2" v-on:click="getUpdateList">刷新升级列表</button>
</div>
<div class="card-body">
<div class="border">
<div class="p-3 form-inline mb-3 border-bottom">
<label class="mr-1">版本:</label>
<select class="form-control" style="width:100px;" v-model="filter.version">
<option value="">---</option>
<option v-for="item in filter.versionItems">{{item}}</option>
</select>
<label class="ml-3 mr-1">数据库:</label>
<select class="form-control" style="width:100px;" v-model="filter.dbschema">
<option value="">---</option>
<option value="prod">prod</option>
<option value="client">client</option>
<option value="admin">admin</option>
</select>
<label class="ml-3"><input type="checkbox" v-model="filter.upstate" class="mr-1" />只显示未执行</label>
</div>
<table class="table table-hover">
<colgroup>
<col span="1" width="30" />
<col span="1" width="90" />
<col span="1" width="90" />
<col span="1" width="90" />
<col span="1" width="120" />
</colgroup>
<thead>
<tr>
<th><label><input type="checkbox" v-model="checkAll" v-on:change="changeAllChecked" /></label></th>
<th>版本</th>
<th>数据库</th>
<th>内容</th>
<th>操作</th>
<th>执行结果</th>
</tr>
</thead>
<tbody>
<tr v-for="item in updateList" v-bind:style="isShowItem(item)">
<td><input type="checkbox" v-model="item.checked" v-on:change="changeItemChecked(item)" /></td>
<td>{{item.Version}}</td>
<td>{{item.DbSchema}}</td>
<td><a href="javascript:void(0)" v-on:click="viewUpdateContent(item.UpKey)">查看</a></td>
<td><a href="javascript:void(0)" v-on:click="executeUpdate(item)">{{item.UpState<1?"执行更新":"重新执行"}}</a></td>
<td :class="itemStatusClass(item)">{{item.UpResult}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="modal" id="dbContentModal" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">
数据库升级脚本内容
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<textarea class="codesql public_text" id="dbContentText"></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
@section heads{
<link href="~/Statics/libs/codemirror/lib/codemirror.css" rel="stylesheet" />
}
@section scripts{
<script src="~/Statics/libs/codemirror/lib/codemirror.js"></script>
<script src="~/Statics/libs/codemirror/addon/matchbrackets.js"></script>
<script src="~/Statics/libs/codemirror/addon/comment/continuecomment.js"></script>
<script src="~/Statics/libs/codemirror/addon/comment/comment.js"></script>
<script src="~/Statics/libs/codemirror/mode/sql.js"></script>
<script src="~/Scripts/admin/dbupdate.js"></script>
}
@@ -1,35 +0,0 @@
@{
ViewData["Title"] = "首页";
}
@section heads{
<style>
hr {margin:10px 0; }
.col-m1 { width:300px; }
</style>
}
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-auto col-m1">当前版本</div>
<div class="col">@(AppManager.Version)</div>
</div>
<hr />
<div class="row">
<div class="col-auto col-m1">启动时间</div>
<div class="col">@(AppManager.StartTime)</div>
</div>
<hr />
@foreach (var item in AppManager.GetSysInfo())
{
<div class="row">
<div class="col-auto col-m1">@(item.Key)</div>
<div class="col">@(item.Message)</div>
<div class="col-auto col-m1">@(item.TimeStamp)</div>
</div>
<hr />
}
</div>
</div>
@@ -1,156 +0,0 @@
@model IEnumerable<AppConfig>
@{
var id = 0;
ViewData["Title"] = "全局配置(AppConfig)";
}
@section heads{
<style>
input[type=checkbox] {
width: 17px;
height: 17px;
vertical-align: middle;
margin-top: -3px;
margin-right: 3px;
}
</style>
}
<div style="position:fixed;left:0;right:0;bottom:0px;z-index:10;max-height:65px;">
<div class="container">
<div class="alert alert-danger row" style="margin-bottom:0">
<div class="col">
<p class="m-0 p-3 text-break" id="respMsg">修改后自动保存</p>
</div>
<div class="col-auto text-right" style="width:100px;">
<button class="btn btn-primary" onclick="ResetConfig()">刷新配置</button>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<h4 class="card-title">全局配置(AppConfig)</h4>
</div>
<div class="card-body" style="padding-bottom: 70px;">
@foreach (var item in Model)
{
id++;
var label = item.PName + "-" + item.Remark;
<div class="mb-5">
@if (item.PType == "bool")
{
var val = item.PValue?.ToLowerInvariant();
<label>
<input id="config@(id)" type="checkbox" name="@(item.PName)" onchange="SaveValue('@id')" @("true" == val ? "checked" : "") />
@(label)
</label>
}
else if (item.PType == "string" || item.PType == "int" || item.PType == "double")
{
<div class="font-weight-bold mb-2">@(label)</div>
<input id="config@(id)" type="text" name="@(item.PName)" value="@(item.PValue)" data-value="@(item.PValue)" onblur="SaveValue('@id')" onkeydown="OnInputKeyDown('@id')" class="form-control" style="width:700px" />
}
else if (item.PType == "text")
{
<div style="font-weight:700">@(label)</div>
<textarea id="config@(id)" rows="3" name="@(item.PName)" data-value="@(item.PValue)" onblur="SaveValue('@id')" onkeydown="OnInputKeyDown('@id')" class="form-control" style="width:700px">@(item.PValue)</textarea>
}
else if (item.PType == "html")
{
<div style="font-weight:700">@(label)</div>
<textarea id="config@(id)" rows="3" name="@(item.PName)" data-value="@(item.PValue)" onblur="SaveValue('@id',true)" onkeydown="OnInputKeyDown('@id',true)" class="form-control" style="width:700px">@(item.PValue)</textarea>
<div class="mt-2">
<button class="btn btn-primary" onclick="showUeditorConfig('@id','@(label)')">使用编辑器配置</button>
</div>
}
else
{
IEnumerable<string> names = null;
if (item.PType == "CompanyEnum")
{
names = Enum.GetNames(typeof(YLErp.Configuration.CompanyEnum));
}
else if (item.PType == "ComponentVersion")
{
names = Enum.GetNames(typeof(YLErp.Configuration.ComponentVersion));
}
else if (item.PType == "VolModeEnum")
{
names = Enum.GetNames(typeof(YLErp.Configuration.VolModeEnum));
}
else if (item.PType == "VolSurfaceKeyDateShiftEnum")
{
names = Enum.GetNames(typeof(YLErp.Configuration.VolSurfaceKeyDateShiftEnum));
}
else if (item.PType == "SmoothingDaycountMode")
{
names = Enum.GetNames(typeof(YLErp.Configuration.Enums.SmoothingDaycountMode));
}
else if (item.PType == "ForwardTradePriceModel")
{
names = Enum.GetNames(typeof(YLErp.Configuration.Enums.ForwardTradePriceModel));
}
else if (item.PType == "SaleMode")
{
names = Enum.GetNames(typeof(YLErp.Configuration.Enums.SaleMode));
}
else if (item.PType == "OptionTypeAndBuySell")
{
names = Enum.GetNames(typeof(YLErp.Configuration.Enums.OptionTypeAndBuySell));
}
else if (item.PType == "ForwardValueIsSupplyOrPay")
{
names = Enum.GetNames(typeof(YLErp.Configuration.Enums.ForwardValueIsSupplyOrPay));
}
else if (item.PType == "ExchangeOptionVolType")
{
names = Enum.GetNames(typeof(YLErp.Configuration.Enums.ExchangeOptionVolType));
}
<div style="font-weight:700">@(label)</div>
if (names != null)
{
<select id="config@(id)" class="form-control" name="@(item.PName)" style="width:500px;" onchange="SaveValue('@id')">
@foreach (var name in names)
{
<option value="@(name)" @(name == item.PValue ? "selected" : "")>@(name)</option>
}
</select>
}
}
</div>
}
</div>
</div>
<div class="modal" tabindex="-1" role="dialog" id="ueditorModal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">配置</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div id="editor"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-min" onclick="saveUeditorConfig()">保存</button>
<button type="button" class="btn btn-secondary btn-min" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
@section scripts{
<script src="~/Scripts/ueditor/ueditor.config.js?v=@(HtmlUtil.JsVersion)"></script>
<script src="~/Scripts/ueditor/ueditor.all.min.js?v=@(HtmlUtil.JsVersion)"></script>
<script>
var saveConfigValueUrl = '@Url.Action("AjaxSaveAppConfig")';
var resetConfigValueUrl = '@Url.Action("AjaxResetAppConfig")';
</script>
<script src="~/Scripts/admin/appconfig.js?v=@(HtmlUtil.JsVersion)"></script>
}
@@ -1,64 +0,0 @@
@{
ViewData["Title"] = "客户编辑页面配置";
}
<div class="card">
<div class="card-header">
<h4 class="card-title">客户编辑页面配置</h4>
<div class="ml-auto">
<a href="/admin/otcConfig/downClientEditConfig?t=cur" target="_blank">下载当前配置文件</a>
<a href="/admin/otcConfig/downClientEditConfig?t=def" target="_blank" class="ml-3">下载默认配置文件</a>
</div>
</div>
<div class="card-body">
<div class="border" id="codeDiv">
<textarea id="code" name="code">@ViewData["config"]</textarea>
</div>
<p class="mt-2">使用'meta_'前缀定义扩展属性,属性中不允许出现下划线</p>
<p class="mt-2">
列表配置:
<br />
hidden代表是否要默认在列表中隐藏;如:hidden:true
<br />
optionHide代表是否要在列配置中隐藏;如:optionHide:true
</p>
<div class="mt-4 text-center">
<button class="btn btn-primary pl-5 pr-5" onclick="saveConfig()">保存</button>
</div>
</div>
</div>
@section heads{
<link href="~/Statics/libs/codemirror/lib/codemirror.css" rel="stylesheet" />
<style>
body *::-webkit-scrollbar { width: 10px; height: 10px; transition: .3s background; }
.CodeMirror { height: 100%; min-height: 300px; }
</style>
}
@section scripts{
<script src="~/Statics/libs/codemirror/lib/codemirror.js"></script>
<script src="~/Statics/libs/codemirror/addon/matchbrackets.js"></script>
<script src="~/Statics/libs/codemirror/addon/comment/continuecomment.js"></script>
<script src="~/Statics/libs/codemirror/addon/comment/comment.js"></script>
<script src="~/Statics/libs/codemirror/mode/javascript.js"></script>
<script>
var codeEditor;
$(function () {
$('#codeDiv').height($(window).height() - 300);
codeEditor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
continueComments: "Enter",
extraKeys: { "Ctrl-Q": "toggleComment" }
});
});
function saveConfig() {
main.post("/admin/otcConfig/AjaxSaveClientEditConfig", { config: codeEditor.getValue() }).done(function () {
main.alert("保存成功");
}).fail(function () {
main.alert("提交失败");
});
}
</script>
}
@@ -1,87 +0,0 @@
@{
ViewData["Title"] = "邮件模板配置";
}
<div class="card">
<div class="card-header">
<h4 class="card-title">邮件模板配置</h4>
</div>
<div class="card-body">
<div class="mb-4">
<select name="EmailType" id="EmailType" onchange="changeType()" class="form-control" style="width:150px;">
<option value="交易确认书">交易确认书</option>
<option value="结算确认书">结算确认书</option>
<option value="交易确认书(用印)">交易确认书(用印)</option>
<option value="结算确认书(用印)">结算确认书(用印)</option>
@* EQD-5320 资金通知书:value 与 bond-oms Java FundEmailHandler 查询的 EmailType 一字不差,勿改名;
此场景 {{文档编号}}/{{交易列表}} 渲染为空,可用 {{客户名称}}/{{交易日期}} *@
<option value="追保资金通知书">追保资金通知书</option>
<option value="轧差资金通知书">轧差资金通知书</option>
</select>
</div>
<div class="mb-4">
<label>邮件标题模板(变量参数:{{客户名称}},{{交易日期}},{{文档编号}})</label>
<input type="text" name="TitleTemplate" id="TitleTemplate" class="form-control" />
</div>
<div class="mb-4">
<label>邮件内容模板(变量参数:{{客户名称}},{{交易日期}},{{文档编号}})</label>
<div id="editor"></div>
</div>
<div class="mb-4">
<button class="btn btn-primary" style="width:120px;" onclick="saveData()">保存</button>
</div>
</div>
</div>
@section scripts{
<script src="~/Scripts/ueditor/ueditor.config.js?v=@(HtmlUtil.JsVersion)"></script>
<script src="~/Scripts/ueditor/ueditor.all.min.js?v=@(HtmlUtil.JsVersion)"></script>
<script>
var page = {
AjaxSaveDataUrl:'@(Url.Action("AjaxSaveMailTemplate"))',
AjaxGetDetailUrl: '@(Url.Action("AjaxGetMailTemplate"))'
};
var ueditor;
$(function () {
ueditor = UE.getEditor('editor', {
autoHeight: false,
wordCount: false,
autoHeightEnabled: false,
initialFrameHeight: 500
});
ueditor.ready(changeType);
});
function changeType() {
ueditor.reset();
ueditor.setContent('');
var emailType = $('#EmailType').val();
main.post(page.AjaxGetDetailUrl, { emailType: emailType })
.done(function (resp) {
$('#TitleTemplate').val(resp.data.TitleTemplate);
let html = main.decodeHtmlEntity(resp.data.BodyTemplate);
ueditor.execCommand('insertHtml', html || "");
});
}
function saveData() {
var data = {
EmailType: $('#EmailType').val(),
TitleTemplate: $.trim($('#TitleTemplate').val())
};
data.BodyTemplate = encodeURIComponent(ueditor.getContent());
if (!data.TitleTemplate) {
return main.alert('缺少邮件标题模板');
}
var $e = $(event.target).prop('disabled', true);
main.post(page.AjaxSaveDataUrl, data).done(function (resp) {
layer.msg('保存成功');
}).always(function () {
$e.prop('disabled', false);
});
}
</script>
}
@@ -1,88 +0,0 @@
@using YLErp.Commons
@using YLErp.Web.Areas.Admin.Models
@model OtcFormatViewModel
@{
ViewData["Title"] = "OtcFormat配置";
var pageObj = new
{
AjaxSaveUrl = Url.Action("AjaxSaveOtcFormat")
};
}
@section heads{
<style>
.btn-primary { min-width: 100px; }
.opt-title-dev { width: 120px; line-height: 32px; }
.opt-input-dev { width: 150px; margin-right: 20px; }
.opt-input-dev input { text-align: center; }
.opt-check-dev { line-height: 35px; }
.opt-check-dev > label { margin-right: 35px; }
.opt-check-dev input { margin-right: 5px; }
</style>
}
<div class="card">
<div class="card-header">
<h4 class="card-title">OtcFormat配置</h4>
</div>
<div class="card-body" id="configCont">
@foreach (var item in Model.SelectItems)
{
<div class="card">
<div class="card-header">
<h4 class="card-title">@(item.Text)</h4>
</div>
<div class="card-body otcformat" data-pname="@(item.Value)">
@foreach (var item2 in item.SelectItems)
{
var opt = (OtcFormatOption)item2.Tag;
<form class="row mb-4 opt-item-div" data-pname="@(item2.Value)">
<div class="col-auto opt-title-dev">
@(item2.Text):
</div>
<div class="col-auto opt-input-dev">
<input type="number" class="form-control" min="0" step="1" max="6" name="precision" value="@(opt.precision)" />
</div>
<div class="col opt-check-dev">
<label><input type="checkbox" name="rounded" value="true" @(opt.rounded ? "checked" : "") />四舍五入</label>
<label><input type="checkbox" name="grouping" value="true" @(opt.grouping ? "checked" : "") />千分位分组</label>
<input type="hidden" name="rounded" value="false" />
<input type="hidden" name="grouping" value="false" />
</div>
</form>
}
</div>
</div>
}
<div class="offset-3 mt-5">
<button type="button" class="btn btn-primary" onclick="saveConfig()">保存</button>
</div>
</div>
</div>
@section scripts{
<script>
const page = @Json.Serialize(pageObj);
function saveConfig() {
let postData = {};
$('.otcformat').each(function () {
let item = {};
$(this).find('form').each(function () {
item[$(this).data("pname")] = $(this).serializeObject();
});
postData[$(this).data("pname")] = item;
});
main.post(page.AjaxSaveUrl, postData).done(function (resp) {
main.alert("保存成功");
});
}
</script>
}
@@ -1,170 +0,0 @@
@model YLErp.Configuration.SettlementConfig
@{
ViewData["Title"] = "收盘配置";
var pageObj = new
{
AjaxSaveUrl = Url.Action("AjaxSaveSettlementConfig"),
AjaxReCalcBuySell = Url.Action("AjaxClientBalanceReCalcBS"),
AjaxReCalcBuySellProcess=Url.Action("AjaxClientBalanceReCalcProcess"),
};
var allVolTypes = YLErp.Web.Models.SettlementViewModel.GetVolTypes();
var checkedVolTypes = Model.VolTypes.Split(',').Where(n => !string.IsNullOrWhiteSpace(n)).ToArray();
}
@section heads{
<style>
.form-label { width: 120px !important; }
.btn-primary { min-width: 100px; }
.search-label{
margin-right:5px
}
.search-input{
width:120px;
height:30px;
}
</style>
}
<div class="card">
<div class="card-header">
<h4 class="card-title">收盘配置</h4>
</div>
<div class="card-body" id="configCont">
<form class="form-layout" onsubmit="return false;" id="form1">
<div class="form-row">
<label class="form-label col-auto">功能版本:</label>
<div class="col">
<select name="Version" class="form-control" id="selVersion" onchange="changeVersion()" style="width:160px;">
<option value="V2" selected>V2</option>
</select>
</div>
</div>
<div class="form-row">
<label class="form-label col-auto"></label>
<div class="col">
<label class="mr-2">
<input type="checkbox" name="CalcPnlExplain" class="mr-1" value="true" @(Model.CalcPnlExplain ? "checked" : "") />
是否计算盈亏分解指标
</label>
</div>
</div>
<div class="form-row">
<label class="form-label col-auto"></label>
<div class="col">
<label class="mr-2">
<input type="checkbox" name="CalcPnlExplain" class="mr-1" value="true" @(Model.CheckExchangeClose ? "checked" : "") />
是否检查场内交易平仓(平仓超过开仓时报错)
</label>
</div>
</div>
<div class="form-row v2-show">
<label class="form-label col-auto">默认价格模式:</label>
<div class="col">
<label class="mr-2"><input type="checkbox" name="PriceType" class="mr-1" value="1" @((Model.PriceType & 1) > 0 ? "checked" : "") />收盘价</label>
<label class="mr-2"><input type="checkbox" name="PriceType" class="mr-1" value="2" @((Model.PriceType & 2) > 0 ? "checked" : "") />结算价</label>
</div>
</div>
<div class="form-row v2-show">
<label class="form-label col-auto">默认波动率类型:</label>
<div class="col">
@foreach (var item in allVolTypes)
{
var _checked = checkedVolTypes.Contains(item.Value) ? "checked" : "";
<label class="mr-2"><input type="checkbox" name="VolTypes" class="mr-1" value="@(item.Value)" @(_checked) />@(item.Text)</label>
}
</div>
</div>
<div class="form-row v2-show">
<label class="form-label col-auto">部分结算:</label>
<div class="col">
<label class="mr-2"><input type="checkbox" name="SupportPart" class="mr-1" value="true" @(Model.SupportPart ? "checked" : "") />支持</label>
</div>
</div>
<div class="form-row v2-show">
<label class="form-label col-auto">分客户结算:</label>
<div class="col">
<label class="mr-2"><input type="checkbox" name="SubCustomerPart" class="mr-1" value="true" @(Model.SubCustomerPart ? "checked" : "") />支持</label>
</div>
</div>
<div class="form-row v2-show">
<label class="form-label col-auto">调试配置:</label>
<div class="col">
<label class="mr-2"><input type="checkbox" name="SkipLastPvCheck" class="mr-1" value="true" @(Model.SkipLastPvCheck ? "checked" : "") />跳过上一交易日结算检查</label>
<label class="mr-2"><input type="checkbox" name="OutputDebugLog" class="mr-1" value="true" @(Model.OutputDebugLog ? "checked" : "") />输出调试日志</label>
<label class="mr-2">
<input type="checkbox" name="CalcForwradMargin" class="mr-1" value="true" @(Model.CalcForwradMargin ? "checked" : "") />计算远期预付金
</label>
</div>
</div>
<div class="form-row v2-show">
<label class="form-label col-auto">买卖权资金结算: </label>
<div class="col">
<label class="mr-2">
<input type="checkbox" name="CalcBuySell" class="mr-1" value="true" @(Model.CalcBuySell ? "checked" : "") />支持
</label>
<label class="mr-2">
<span class="search-label" >日期</span>
<input class="search-input" id="DateFromTradeDate" type="text">-
<input class="search-input" id="DateToTradeDate" type="text">
</label>
<label class="mr-2"> <button type="button" class="btn btn-primary" onclick="reCalcBuySell()">重新计算</button></label>
<label class="mr-2" id="reCalcResult"></label>
</div>
</div>
<input type="hidden" name="CalcForwradMargin" value="false" />
</form>
<div>
<div class="form-label d-inline-block"></div>
<button type="button" class="btn btn-primary" onclick="saveConfig()">保存</button>
</div>
</div>
</div>
@section scripts{
<script>
const page = @Json.Serialize(pageObj);
var sh;
function saveConfig() {
let $e = $(event.target).prop('disabled', true);
let data = $('#form1').serializeObject();
Array.isArray(data.PriceType)&&(data.PriceType = data.PriceType.reduce((s, x) => s | parseInt(x), 0));
Array.isArray(data.VolTypes)&&(data.VolTypes = data.VolTypes.join(","));
main.post(page.AjaxSaveUrl, data).done(function (resp) {
layer.msg('保存成功');
}).always(function () {
$e.prop('disabled', false);
});
}
function changeVersion() {
}
function reCalcBuySell(){
let $e = $(event.target).prop('disabled', true);
main.post(page.AjaxReCalcBuySell, { TradeDateStart: $("#DateFromTradeDate").val(), TradeDateEnd: $("#DateToTradeDate").val() }).done(function (resp) {
$("#reCalcResult").text("正在计算中");
layer.msg('开始计算');
sh=setInterval(getReCalcBuySellProcess,10000);
}).always(function () {
$e.prop('disabled', false);
});
}
function getReCalcBuySellProcess(){
main.post(page.AjaxReCalcBuySellProcess).done(function (resp) {
if (resp!=null&&resp.data) {
if (resp.data.Msg == "全部计算结束" || resp.data.Msg.indexOf("异常")!=-1) {
clearInterval(sh);
}
var msg = resp.data.SettleDate + " " + resp.data.Msg;
$("#reCalcResult").text(msg);
}else{
clearInterval(sh);
}
})
}
</script>
}
@@ -1,162 +0,0 @@
@model YLErp.MailKit.SmtpConfig
@{
ViewData["Title"] = "邮件发送配置";
var pageObj = new
{
Model = Model,
AjaxSaveSmtpConfig = Url.Action("AjaxSaveSmtpConfig"),
AjaxSendMailTest = Url.Action("AjaxSendMailTest")
};
}
@section heads{
<style>
.btn-primary {
min-width: 100px;
}
</style>
}
<div class="card">
<div class="card-header">
<h4 class="card-title">邮件发送配置</h4>
</div>
<div class="card-body" id="configCont" v-cloak>
<form class="form-layout" onsubmit="return false;" id="form1">
<div class="row">
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">主机:</label>
<div class="col">
<input type="text" class="form-control" name="Server" v-model="Server" maxlength="50">
</div>
</div>
<div class="form-row">
<label class="form-label col-auto">端口:</label>
<div class="col">
<input type="number" class="form-control" name="Port" v-model="Port" step="1" min="0" max="66666">
</div>
</div>
<div class="form-row">
<label class="form-label col-auto">选项:</label>
<div class="col">
<!--使用SSL-->
<label class="mr-2"><input type="checkbox" class="mr-1" name="EnableSsl" v-model="EnableSsl">使用SSL</label>
<!--压缩附件-->
<label class="mr-2"><input type="checkbox" class="mr-1" name="ZipAttach" v-model="ZipAttach">压缩附件</label>
</div>
</div>
</div>
</div>
<div class="form-row">
<label class="form-label col-auto">用户</label>
<div class="col">
<input type="text" class="form-control" name="UserName" v-model="UserName" maxlength="100">
</div>
<label class="form-label col-auto w-auto">密码</label>
<div class="col">
<input type="password" class="form-control" name="Password" v-model="Password" maxlength="30">
</div>
<div class="col-auto">
<!--需要回执-->
<label><input type="checkbox" class="mr-1" name="Receipt" v-model="Receipt">需要回执</label>
</div>
<label class="form-label col-auto">显示名称</label>
<div class="col">
<input type="text" class="form-control" name="From" v-model="From" maxlength="100" placeholder="可不填,默认为用户">
</div>
</div>
<div class="form-row" v-for="item in OtherUsers">
<label class="form-label col-auto"><a href="javascript:;" v-on:click="removeUser(item)"><i class="fa fa-remove"></i></a> 用户</label>
<div class="col">
<input type="text" class="form-control" name="UserName" v-model="item.UserName" maxlength="100">
</div>
<label class="form-label col-auto w-auto">密码</label>
<div class="col">
<input type="password" class="form-control" name="Password" v-model="item.Password" maxlength="30">
</div>
<div class="col-auto">
<!--需要回执-->
<input type="hidden" name="Receipt" value="false">
<label><input type="checkbox" class="mr-1" name="Receipt" v-model="item.Receipt">需要回执</label>
</div>
<label class="form-label col-auto">显示名称</label>
<div class="col">
<input type="text" class="form-control" name="From" v-model="item.From" maxlength="100" placeholder="可不填,默认为用户">
</div>
</div>
</form>
<div class="offset-3 mt-5">
<button type="button" class="btn btn-primary" v-on:click="saveConfig">保存</button>
<button type="button" class="btn btn-primary" v-on:click="newUser">新增用户</button>
</div>
</div>
</div>
<div class="card">
<div class="card-header">
<h4 class="card-title">邮件发送测试</h4>
</div>
<div class="card-body">
<div class="form-inline">
<div class="form-group">
<span>发送测试邮件到&nbsp;&nbsp;</span>
<input type="text" class="form-control" name="mailTo" id="txtmailTo" style="width:300px;" />
<button class="btn btn-primary ml-2" id="btnSendMailTest" onclick="sendMailTest()">发送</button>
</div>
</div>
</div>
</div>
@section scripts{
<script>
const page = @Json.Serialize(pageObj);
!page.Model.OtherUsers && (page.Model.OtherUsers = []);
const vue = new Vue({
el: '#configCont',
data: page.Model,
methods: {
newUser() {
this.OtherUsers.push({ UserName: '', Password: '', Receipt: true });
},
removeUser(item) {
var index = this.OtherUsers.indexOf(item);
this.OtherUsers.splice(index,1);
},
saveConfig() {
var users = this.OtherUsers.map(x => (x.UserName || '').trim().toLowerCase());
users.push((this.UserName || '').trim().toLowerCase());
if (users.some(x => !x)) {
return main.alert('用户不能为空');
}
if (users.length !== _.uniq(users).length) {
return main.alert('用户不能重复');
}
var $e = $(event.target).prop('disabled', true);
main.post(page.AjaxSaveSmtpConfig, this.$data).done(function (resp) {
layer.msg('保存成功');
}).always(function () {
$e.prop('disabled', false);
});
}
}
});
function sendMailTest() {
var $e = $(event.target).prop('disabled', true);
main.post(page.AjaxSendMailTest, { mailTo: $('#txtmailTo').val() }).done(function (resp) {
layer.msg('发送成功');
}).always(function () {
$e.prop('disabled', false);
});
}
</script>
}
@@ -1,68 +0,0 @@
@{
ViewData["Title"] = "结算报告配置";
var nv = YieldChain.Helpers.UrlHelper.ParseQueryString(PS.Config.ErpElement.TradeMarketReportCfg);
var pageObj = new
{
Model = new
{
TradeMarketReportStartDate = nv?["开始日期"].TrimToNull() ?? "NONE",
},
AjaxSaveConfigUrl = Url.Action("AjaxSaveAppConfig")
};
}
@section heads{
<style>
.btn-primary {
min-width: 100px;
}
.form-layout .form-row .form-label {
width: 220px;
}
</style>
}
<div class="card">
<div class="card-header">
<h4 class="card-title">结算报告配置</h4>
</div>
<div class="card-body" id="configCont" v-cloak>
<form class="form-layout" onsubmit="return false;" id="form1">
<div class="form-row">
<label class="form-label col-auto">开始日期:</label>
<div class="col">
<select name="TradeMarketReportStartDate" v-model="TradeMarketReportStartDate" class="form-control d-inline-block" style="width:200px;">
<option value="NONE">空值</option>
<option value="SYSTEMDATE">系统日期</option>
</select>
</div>
</div>
</form>
<div class="offset-3 mt-5">
<button type="button" class="btn btn-primary" v-on:click="saveConfig">保存</button>
</div>
</div>
</div>
@section scripts{
<script>
const page = @Json.Serialize(pageObj);
const vue = new Vue({
el: '#configCont',
data: page.Model,
methods: {
saveConfig() {
var $e = $(event.target).prop('disabled', true);
let data = { name: 'Erp.TradeMarketReportCfg', value: '&开始日期=' + this.TradeMarketReportStartDate };
main.post(page.AjaxSaveConfigUrl, data).done(function (resp) {
layer.msg('保存成功');
}).always(function () {
$e.prop('disabled', false);
});
}
}
});
</script>
}
@@ -1,94 +0,0 @@
@{
ViewData["Title"] = "交易要素配置";
var nv = YieldChain.Helpers.UrlHelper.ParseQueryString(PS.Config.ErpElement.TradePricingCfg);
var pageObj = new
{
Model = new
{
TradeCloseVolatility = nv?["目标波动率"].TrimToNull() ?? "BidAsk",
NumOfSmoothingDays = nv?["平滑过渡天数"].TrimToNull() ?? "NONE",
ForwardPriceType = nv?["远期期初价类型"].TrimToNull() ??"期权行权价格"
},
AjaxSaveConfigUrl = Url.Action("AjaxSaveAppConfig")
};
}
@section heads{
<style>
.btn-primary {
min-width: 100px;
}
.form-layout .form-row .form-label {
width: 220px;
}
</style>
}
<div class="card">
<div class="card-header">
<h4 class="card-title">交易要素配置(默认值)</h4>
</div>
<div class="card-body" id="configCont" v-cloak>
<form class="form-layout" onsubmit="return false;" id="form1">
<div class="form-row">
<label class="form-label col-auto">目标波动率:</label>
<div class="col">
<select name="TradeCloseVolatility" v-model="TradeCloseVolatility" class="form-control d-inline-block" style="width:200px;">
<option value="BidAsk">BidAsk</option>
<option value="Mid">Mid</option>
</select>
</div>
</div>
<div class="form-row">
<label class="form-label col-auto">平滑过渡天数:</label>
<div class="col">
<select name="NumOfSmoothingDays" v-model="NumOfSmoothingDays" class="form-control d-inline-block" style="width:200px;">
<option value="TTM">TTM</option>
<option value="ONE">1</option>
<option value="NONE">空值</option>
</select>
</div>
</div>
<div class="card-header">
<h5 class="card-title" style="font-size:1rem;">累计期权交易要素配置</h5>
</div>
<div class="form-row" style="margin-top:10px;">
<label class="form-label col-auto" >远期期初价类型:</label>
<div class="col">
<select name="ForwardPriceType" v-model="ForwardPriceType" class="form-control d-inline-block" style="width:200px;">
<option value="期权行权价格">期权行权价格</option>
<option value="期权期初价格">期权期初价格</option>
<option value="远期开仓现价">远期开仓现价</option>
<option value="期权成交日收盘价">期权成交日收盘价</option>
</select>
</div>
</div>
</form>
<div class="offset-3 mt-5">
<button type="button" class="btn btn-primary" v-on:click="saveConfig">保存</button>
</div>
</div>
</div>
@section scripts{
<script>
const page = @Json.Serialize(pageObj);
const vue = new Vue({
el: '#configCont',
data: page.Model,
methods: {
saveConfig() {
var $e = $(event.target).prop('disabled', true);
let data = { name: 'Erp.TradePricingCfg', value: '&目标波动率=' + this.TradeCloseVolatility + "&平滑过渡天数=" + this.NumOfSmoothingDays+ "&远期期初价类型=" + this.ForwardPriceType };
main.post(page.AjaxSaveConfigUrl, data).done(function (resp) {
layer.msg('保存成功');
}).always(function () {
$e.prop('disabled', false);
});
}
}
});
</script>
}
@@ -1,125 +0,0 @@
@model IEnumerable<YLErp.Web.App_Start.AppConfig.ConfigFieldAttributeDto>
@{
ViewData["Title"] = "当前系统配置";
}
@section heads{
<style>
body { padding-bottom: 50px; }
input[type=checkbox] { width: 18px; height: 18px; vertical-align: middle; margin-top: -3px; margin-right: 2px; }
hr { margin-top: 1rem; margin-bottom: 1rem; }
.popover {
max-width: 450px;
}
</style>
}
<div class="card">
<div class="card-header">
<h4 class="card-title">当前系统配置</h4>
</div>
<div class="card-body">
<form id="form1" onsubmit="return false;">
@foreach (var attr in Model)
{
var label = attr.Description;
<div>
@if (attr.FieldType == typeof(Boolean))
{
<label>
<input type="checkbox" name="@(attr.FieldName)" @("True" == attr.FieldValue ? "checked" : "") value="true" />
@(label)
</label>
}
else if (attr.FieldType == typeof(String))
{
<div style="font-weight:700">@(label)</div>
if (!string.IsNullOrWhiteSpace(attr.DataMapString))
{
<textarea name="@(attr.FieldName)" rows="2" class="form-control">@(attr.FieldValue)</textarea>
<button type="button" class="btn btn-link has-popover" data-toggle="popover" data-placement="bottom" title="参数说明" data-content="@Html.Raw(attr.DataMapString.Trim().Replace("\n", "<br>"))">配置参数说明</button>
}
else
{
<input type="text" name="@(attr.FieldName)" value="@(attr.FieldValue)" class="form-control" style="display:inline-block;width:500px" />
}
}
else if (attr.FieldType == typeof(int))
{
if (attr.IsFlags && !string.IsNullOrWhiteSpace(attr.DataMapString))
{
<label class="mr-2">@(label):</label>
var flags = int.Parse(attr.FieldValue);
var nv = YieldChain.Helpers.UrlHelper.ParseQueryString(attr.DataMapString);
foreach (var key in nv.AllKeys)
{
var chked = (int.Parse(nv[key]) & flags) > 0;
<label class="mr-1"><input type="checkbox" @(chked ? "checked" : "") value="@(nv[key])" onchange="_config.changeFlags()" />@(key)</label>
}
<input type="hidden" class="flags" name="@(attr.FieldName)" value="@(attr.FieldValue)" />
}
}
</div>
<hr />
}
</form>
<div>
<button class="btn btn-primary" style="width:120px;" onclick="_config.save()">保存配置</button>
</div>
</div>
</div>
@section scripts{
<script>
var saveUrl = '@Url.Action("AjaxSaveWebConfig")';
const OtcWebConfig = function (options) {
if (!options || !options.saveUrl) {
alert("缺少配置参数:saveUrl");
return;
}
//保存配置
this.save = function () {
$.post(options.saveUrl, $('#form1').serialize()).done(function (resp) {
if (resp.errcode) {
layer.alert(resp.errmsg);
} else {
layer.msg('保存成功');
}
}).fail(function () {
layer.alert('请求失败');
});
};
this.changeFlags = function () {
var $e = $(event.target);
var flag = parseInt($e.val());
if (!flag) {
alert('程序错误1');
return;
}
var $ef = $e.parent().nextAll('.flags');
var flags = parseInt($ef.val());
if (isNaN(flags) || flags < 0) {
alert('程序错误2');
return;
}
if ($e.prop('checked')) {
flags |= flag;
} else {
flags ^= flag;
}
$ef.val(flags);
};
};
const _config = new OtcWebConfig({ saveUrl: saveUrl });
$(function () {
$('.has-popover').popover({ html:true});
});
</script>
}
@@ -1,87 +0,0 @@
@section scripts{
<script>
function Add() {
startclientView(0);
}
function addFunctionAlty(value, row, index) {
return [
'<button id="Delete" type="button" class="btn btn-primary">删除</button>',
].join('');
}
window.operateEvents = {
'click #Delete': function (e, value, row, index) {
deleteowner(row.ID);
},
'click #Edit': function (e, value, row, index) {
startclientView(row.ID);
}
};
$('#table').bootstrapTable({
url: "OwnerInfo/GetOwnerInfo",
onDblClickRow: function (arg1, arg2, arg3) {
startclientView(arg1.ID);
},
refreshOptions: function () { }
});
function startclientView(id) {
var srcurl = "/Admin/OwnerInfo/OwnerInfoEdit?ID=" + id;
layer.open({
type: 2,
title: "编辑确认书信息",
shadeClose: false,
shade: 0.4,
area: ['700px', '800px'],
content: srcurl
});
}
function Change() {
$('#table').bootstrapTable('refreshOptions', {});
}
function deleteowner(ID) {
if (confirm("确定删除吗?")) {
$.ajax({
type: "Post",
url: "/OwnerInfo/Deleteowner",
data: { id: ID },
success: function (data) {
Change();
},
error: function (msg) {
alert("error:" + msg);
}
});
}
}
</script>
}
<button class="btn btn-primary" onclick="Add()">添加</button>
<button class="btn btn-primary" onclick="Change()">刷新</button>
<table id="table" data-toggle="table">
<thead>
<tr>
<th data-field="ID" data-visible="false"></th>
<th data-field="Condition">条件</th>
<th data-field="FullName">公司全称</th>
<th data-field="CounterpartyCode">营业执照</th>
<th data-field="RegisteredAddress">注册地址</th>
<th data-field="LegalPerson">法人</th>
<th data-field="BankAccount">户名</th>
<th data-field="Bank">开户行</th>
<th data-field="Card">账号</th>
<th data-field="Payment">大额行号</th>
<th data-field="ContactName">联系人</th>
<th data-field="Address">地址</th>
<th data-field="Email">邮件</th>
<th data-field="PhoneNumber">电话</th>
<th data-field="Fax">传真</th>
<th data-events="operateEvents" data-formatter="addFunctionAlty">操作</th>
</tr>
</thead>
</table>
@@ -1,198 +0,0 @@
@model Owner_info
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>OwnerInfoEdit</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="msapplication-TileColor" content="#2d89ef">
<meta name="theme-color" content="#4188c9">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link href="~/statics/bundles/bundleV2.min.css" rel="stylesheet" />
<link href="~/Style/Admin/main.css" rel="stylesheet" />
<script src="~/statics/bundles/bundleV2.js?v=@(HtmlUtil.JsVersion)"></script>
<script src="~/Statics/libs/layer/layer.js?v=@(HtmlUtil.JsVersion)"></script>
<script>
function btnSave() {
let ID = parseInt($("#ID").val());
let Condition = $("#Condition").val();
let FullName = $("#FullName").val();
let CounterpartyCode = $("#CounterpartyCode").val();
let RegisteredAddress = $("#RegisteredAddress").val();
let LegalPerson = $("#LegalPerson").val();
let BankAccount = $("#BankAccount").val();
let Bank = $("#Bank").val();
let Card = $("#Card").val();
let Payment = $("#Payment").val();
let ContactName = $("#ContactName").val();
let Address = $("#Address").val();
let Email = $("#Email").val();
let PhoneNumber = $("#PhoneNumber").val();
let Fax = $("#Fax").val();
var date = {
Condition: Condition,
ID: ID,
FullName: FullName,
CounterpartyCode: CounterpartyCode,
RegisteredAddress:RegisteredAddress,
LegalPerson: LegalPerson,
BankAccount: BankAccount,
Bank: Bank,
Card: Card,
Payment: Payment,
ContactName: ContactName,
Address: Address,
Email: Email,
PhoneNumber: PhoneNumber,
Fax: Fax
}
var srcurl = "/Admin/OwnerInfo/PostOwnerInfo";
main.post(srcurl, date).done(function (resp) {
window.parent.layer.closeAll();
window.parent.Change();
}).always(function () {
$e.prop('disabled', false);
});
};
</script>
</head>
<body>
<form class="form-layout" onsubmit="return false;" id="form1">
<div class="card-body" id="OwnerInfo">
<input type="text" class="form-control" id="ID" hidden value="@Model.ID" />
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">条件</label>
<div class="col">
<input type="text" class="form-control" id="Condition" value="@Model.Condition" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">公司全称</label>
<div class="col">
<input type="text" class="form-control" id="FullName" value="@Model.FullName" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">营业执照</label>
<div class="col">
<input type="text" class="form-control" id="CounterpartyCode" value="@Model.CounterpartyCode" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">注册地址</label>
<div class="col">
<input type="text" class="form-control" id="RegisteredAddress" value="@Model.RegisteredAddress" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">法人</label>
<div class="col">
<input type="text" class="form-control" id="LegalPerson" value="@Model.LegalPerson" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">户名</label>
<div class="col">
<input type="text" class="form-control" id="BankAccount" value="@Model.BankAccount" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">开户行</label>
<div class="col">
<input type="text" class="form-control" id="Bank" value="@Model.Bank" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">账号</label>
<div class="col">
<input type="text" class="form-control" id="Card" value="@Model.Card" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">大额行号</label>
<div class="col">
<input type="text" class="form-control" id="Payment" value="@Model.Payment" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">联系人</label>
<div class="col">
<input type="text" class="form-control" id="ContactName" value="@Model.ContactName" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">地址</label>
<div class="col">
<input type="text" class="form-control" id="Address" value="@Model.Address" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">邮件</label>
<div class="col">
<input type="text" class="form-control" id="Email" value="@Model.Email" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">电话</label>
<div class="col">
<input type="text" class="form-control" id="PhoneNumber" value="@Model.PhoneNumber" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-row">
<label class="form-label col-auto">传真</label>
<div class="col">
<input type="text" class="form-control" id="Fax" value="@Model.Fax" />
</div>
</div>
</div>
</div>
</form>
<div class="card-footer">
<div class="col-auto">
<button class="btn btn-primary" onclick="btnSave()">保存</button>
</div>
</div>
</body>
</html>
@@ -1,162 +0,0 @@
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="msapplication-TileColor" content="#2d89ef">
<meta name="theme-color" content="#4188c9">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<title>系统管理-@(ViewData["Title"])</title>
<link href="~/statics/bundles/bundleV2.min.css" rel="stylesheet" />
<link href="~/Style/Admin/main.css" rel="stylesheet" />
@RenderSection("heads", required: false)
</head>
<body>
<div class="page">
<div class="flex-fill">
<div class="header py-4">
<div class="container">
<div class="d-flex">
<a class="header-brand" href="/admin/home">
系统管理后台
</a>
<div class="d-flex order-lg-2 ml-auto">
<div class="nav-item d-none d-md-flex">
<button class="btn btn-danger" onclick="restartOtcSystem()">重启系统</button>
</div>
<div class="nav-item d-none d-md-flex">
<button class="btn btn-danger" onclick="exist()">退出</button>
</div>
</div>
<a href="#" class="header-toggler d-lg-none ml-3 ml-lg-0" data-toggle="collapse" data-target="#headerMenuCollapse">
<span class="header-toggler-icon"></span>
</a>
</div>
</div>
</div>
<div class="header collapse d-lg-flex p-0" id="headerMenuCollapse">
<div class="container">
<div class="row align-items-center">
<div class="col-lg order-lg-first">
<ul class="nav nav-tabs border-0 flex-column flex-lg-row" id="headerMenuNavs">
<li class="nav-item">
<a class="nav-link" href="@Url.Action("AppConfig","OtcConfig")">AppConfig</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("WebConfig","OtcConfig")">OtcWeb配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("SmtpConfig","OtcConfig")">邮件发送配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("MailTemplate","OtcConfig")">邮件模板配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("OtcFormat","OtcConfig")">OtcFormat配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("SettlementConfig","OtcConfig")">收盘配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("TradePricingCfg","OtcConfig")">交易要素配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("ClientEditConfig","OtcConfig")">客户编辑配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("TradeMarketReportCfg","OtcConfig")">结算报告配置</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("","Tools")">系统工具</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("","OwnerInfo")">确认书信息</a>
</li>
<li class="nav-item">
<a class="nav-link" href="@Url.Action("","DbUpdate")">数据库升级</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="my-3 my-md-5">
<div class="container">
@RenderBody()
</div>
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" id="modalLoading">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
<div class="modal" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" id="waitMeModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="progress mt-5 mb-5">
<div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" style="width: 100%"></div>
</div>
</div>
</div>
</div>
</div>
<script src="~/statics/bundles/bundleV2.js?v=@(HtmlUtil.JsVersion)"></script>
<script src="~/Statics/libs/layer/layer.js?v=@(HtmlUtil.JsVersion)"></script>
<script>
var _layout = {
AjaxRestartUrl: '@Url.Action("AjaxRestart","Home")'
};
//重启系统
function restartOtcSystem() {
$.post(_layout.AjaxRestartUrl).done(function (resp) {
if (resp) {
alert(resp);
window.location.reload();
}
});
}
function exist() {
window.location.href = "/Account/logout";
}
$(function () {
var path = location.pathname.toLowerCase();
$('#headerMenuNavs').find('.nav-link').each(function () {
if ($(this).attr('href').toLowerCase() === path) {
$(this).addClass('active');
return false;
}
});
});
</script>
@RenderSection("scripts", required: false)
</body>
</html>
@@ -1,90 +0,0 @@
@{
ViewData["Title"] = "系统工具";
}
@section heads{
<link href="~/statics/libs/datetime/flatpickr/flatpickr.min.css" rel="stylesheet" />
}
<div class="card">
<div class="card-header">
<h4 class="card-title">重新初始化实时风险运算</h4>
</div>
<div class="card-body">
<button class="btn btn-primary" onclick="resetTradePosition()">重置对冲交易持仓</button>
<button class="btn btn-primary" onclick="resetTradeRiskCalcTaskRunner()">重新初始化实时风险运算</button>
</div>
</div>
<div class="card">
<div class="card-header">
<h4 class="card-title">重新初始化系统默认用户</h4>
</div>
<div class="card-body">
<button class="btn btn-primary" onclick="resetsysUser()">重新初始化系统默认用户</button>
</div>
@if (PS.Config.Company == YLErp.Configuration.CompanyEnum.长江)
{
<div class="card-body">
<div class="">
<label><input type="checkbox" id="inputChangeJiangCheck1" checked /> 清除所选日期已存在的数据</label>
</div>
<div class="mt-2">
<span class="">结算日期:</span><input type="text" id="inputChangeJiangDate1" value="@(DateTime.Today.ToString("yyyy-MM-dd"))" />
<button class="btn btn-primary" onclick="changeJiangSuperviseReportPosition()">执行</button>
</div>
<div class="mt-2 small">使用的结算数据来源由appconfig中的Supervise_Position配置决定</div>
</div>
}
</div>
<div class="card">
<div class="card-header">
<h4 class="card-title">定价日志</h4>
</div>
<div class="card-body">
<button class="btn btn-primary" onclick="queryCalcLog()">查看定价引擎日志</button>
</div>
</div>
@section scripts{
<script src="~/statics/libs/datetime/flatpickr/flatpickr.min.js"></script>
<script>
var page = {
AjaxResetTradePositionUrl: '@Url.Action("AjaxResetTradePosition", "Tools")',
AjaxResetTradeRiskCalcTaskRunnerUrl: '@Url.Action("AjaxResetTradeRiskCalcTaskRunner", "Tools")',
AjaxResetsysUserUrl: '@Url.Action("AjaxResetsysUser", "Tools")',
AjaxChangeJiangUrl: '@Url.Action("AjaxChangeJiangSuperviseReportPosition", "Tools")'
};
$(function () {
flatpickr("#inputChangeJiangDate1", {});
});
//重新初始化实时风险运算
function resetTradeRiskCalcTaskRunner() {
main.post(page.AjaxResetTradeRiskCalcTaskRunnerUrl).done(function (resp) { main.alert('操作成功'); });
}
//重置对冲交易持仓
function resetTradePosition() {
main.post(page.AjaxResetTradePositionUrl).done(function (resp) {main.alert('操作成功');});
}
//重新初始化系统默认用户
function resetsysUser() {
main.post(page.AjaxResetsysUserUrl).done(function (resp) { main.alert('操作成功'); });
}
//长江监管报告-场外业务持仓表
function changeJiangSuperviseReportPosition() {
let postData = {
date: $('#inputChangeJiangDate1').val(),
clearExistings: $('#inputChangeJiangCheck1').prop('checked')
};
main.post(page.AjaxChangeJiangUrl, postData ).done(function (resp) { main.alert('操作成功'); });
}
function queryCalcLog()
{
window.open("/calclog");
}
</script>
}
@@ -1,5 +0,0 @@
@using YLErp
@using YLErp.Web
@using YLErp.Configuration
@using YLErp.Model.Enum
@using YLErp.DBModels
@@ -1,3 +0,0 @@
@{
Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}
@@ -1,104 +0,0 @@
<div id="divObservationDates">
<div class="modal fade" id="modalObservationDates" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{modalTitle}}</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<div class="mb-4">
<span>观察日间隔</span>
<input type="number" name="ObservationNum" v-model="ObservationNum" style="width:80px!important;" />
<select name="ObservationUnit" style="width: 40px;" v-model="ObservationUnit">
@foreach (var item in GlobalData.AllTimeUnits())
{
<option value="@item.Value">@item.Text</option>
}
</select>
<template v-if="ShowDate2OffsetControl">
<span>{{Date2OffsetControlTitle||'日期2计算间隔'}} T +</span>
<input type="number" name="CouponDayInterval" min="0" v-model="CouponDayInterval" v-on:keypress="onCouponDayIntervalKeyPress" style="width:80px!important;" />
</template>
</div>
<div class="mb-4">
<span>节假日调整</span>
<select name="ObservationHolidayType" v-model="ObservationHolidayType">
<option value="Following">向后调整</option>
<option value="Previous">向前调整</option>
<option value="None">不调整</option>
</select>
<span>对齐规则</span>
<select name="AlignEnd" style="width: 100px;" v-model="AlignEnd">
<option value="true">向到期日对齐</option>
<option value="false">向开始日对齐</option>
</select>
<div class="row">
<div class="col">
<button class="btn btn-sm btn-outline-danger mt-2" v-on:click="GetObservationDates()">生成观察日</button>
</div>
<div class="col text-right">
<button class="btn btn-sm btn-outline-danger mt-2" v-on:click="SetObservationDates()">编辑观察日</button>
</div>
</div>
</div>
<div class="obdates-list">
<div class="row mb-3" v-for="item in ">
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="Confirm()">确定</button>
<button class="btn btn-primary" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalObservationDatesText" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">详情设置</h4>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<textarea v-model="observationDates" style="width: 100%; min-height: 300px;" v-on:paste="pasteMe($event)"></textarea>
</div>
<div class="modal-footer">
<button type="button" class="btn" onclick="importObservationDates()">保存</button>
<button class="btn btn-primary" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
<script>
const vueObservationDates = new Vue({
el: '#divObservationDates',
data: {
modalTitle: '设置自定义观察日',
ObservationNum: '1',
ObservationUnit: '天',
CouponDayInterval: '',
ShowDate2OffsetControl: false,
Date2OffsetControlTitle: '',
ObservationHolidayType: 'Following',
obList: [],
obCols: []
},
methods: {
onCouponDayIntervalKeyPress(event) {
return /[\d]/.test(String.fromCharCode(event.keyCode));
},
GetObservationDates() {
},
SetObservationDates() {
}
}
});
</script>
@@ -1,96 +0,0 @@
@{
Layout = "~/Views/Shared/_MainLayout.cshtml";
}
@section JS{
<script type="text/javascript">
var g_grid = {};
$(function () {
var PostData = {};
$(".datepicker").datepicker({ changeMonth: true, changeYear: true, showButtonPanel: true, showOtherMonths: true, selectOtherMonths: true });
@Html.Raw(JqGridSimple.OutGrid("/Departments/DepartmentQuery"));
g_grid = jQuery('#listGrid');
function keyEnter(event) {
try {
var e = event ? event : (window.event ? window.event : null);
if (e.keyCode == 13) {
SearchClick(true);
}
} catch (e) {
}
}
document.onkeydown = keyEnter;
try {
SetAceDropDown();
} catch (e) {
}
function AfterInsertRow(rowid, aData) {
}
});
var colModelGrid = [{
name: 'id', label: 'id', index: 'id', width: 1, align: 'left', hidden: true
} ,{
name: 'PId', label: 'PId', index: 'PId', align: 'left', hidden: true
}, {
name: 'AllDepName', label: '部门名字', index: 'AllDepName', width: 250, align: 'left'
}, {
name: 'DepartmentType', label: '部门类型', index: 'DepartmentType', width: 150, align: 'left'
}
, {
name: '', label: '操作', index: '', width: 110, align: 'left', formatter: showDepGangWei
}];
function reloadDepartMent() {
//重新加载
SearchClick();
$('#modal-editGangWei').modal('hide');
}
function showToolName(cellValue, options, rowObject) {
var html = "<a href=\"javascript:void(0)\" title='新增部门岗位信息' onclick=\"startAddGangWei({0})\">{1}</a> ".template(rowObject.Id, "新增部门岗位");
return html;
}
function startAddGangWei(id) {
$("#iframeeditGangWei").attr("src", "/project/{0}/GangWei/GangWeiEdit/0".template(id));
$('#modal-editGangWei').modal('show');
}
function startAddGangWei(id) {
$("#iframeeditGangWei").attr("src", "/project/{0}/GangWei/GangWeiEdit/0".template(id));
$('#modal-editGangWei').modal('show');
}
function SearchClick(isSearchclick) {
var listGrid = $('#listGrid');
listGrid.appendPostData({ Name: $("#Name").val() });
listGrid.appendPostData({ DepartmentType: $("#DepartmentType").val() });
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
//点击搜索时默认第一页
listGrid.jqGrid('setGridParam', {
page: 1
});
}
listGrid.trigger('reloadGrid');
}
</script>
}
<div class="searchdiv">
@Html.ShortInput("Name", "部门名字")
@Html.MyAceDropdownInput2("DepartmentType", "部门类型:", GlobalData.DeparttypeListItems())
@MyControls.SearchBtn()
</div>
@Html.Raw(JqGridSimple.OutTable())
-12
View File
@@ -1,12 +0,0 @@
@model string
@{
ViewBag.Title = "Syn";
}
<h2>Syn</h2>
@using (Html.BeginForm())
{
<input type="submit" value="更新部门和用户" />
}<br />
@Model
@@ -1,56 +0,0 @@
@using YLErp.Web.Models.JsModels;
@using YLErp.Modules.SwapModule.Dto;
@model TrsAccountManageDto
@{
ViewBag.Title = "做市账户 | 详情";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
var clientNames = Model.TrsAccountManageDetails.Select(s => s.client_name).ToList();
string clientName = clientNames.Count == 0 ? "--" : string.Join(",", clientNames);
}
@section JS{
<script src="~/Scripts/app/trs_account_manage/view.js?v=@HtmlUtil.JsVersion"></script>
}
<div class="row no-gutters">
<div class="yc-panel" style="width:400px">
@if (CurUser.系统管理.做市账户修改)
{
@MyControls.Btn("修改", string.Format("editAccount('{0}')", Model.EncryptId))
}
@if (CurUser.系统管理.做市账户删除)
{
<div style="display:inline-block;float:right;">
@MyControls.Btn("删除", string.Format("deleteAccount('{0}')", Model.EncryptId))
</div>
}
</div>
</div>
<div class="row no-gutters">
<div class="yc-panel" style="width:400px">
<table class="table table-bordered">
<tbody>
<tr>
<td>trader id</td>
<td>@Model.trader_id</td>
</tr>
<tr>
<td>账户</td>
<td>@Model.account</td>
</tr>
<tr>
<td>账户名称</td>
<td>@Model.account_name</td>
</tr>
<tr>
<td>客户</td>
<td>@clientName</td>
</tr>
<tr>
<td>备注</td>
<td>@Model.remark</td>
</tr>
</tbody>
</table>
</div>
</div>
@@ -1,55 +0,0 @@
@{
Layout = null;
}
<div v-if="client.id>0">
<div class="row m-0">
<div class="col">股东董事会成员信息</div>
<div class="col-auto" style="min-width:300px;">
@*<button class="btn btn-primary" type="button" v-on:click="addDuty" v-if="page.canEditList">新增人员</button>*@
<button class="btn btn-primary" type="button" v-on:click="refreshDutysDirector" title="重新加载客户人员信息列表"><i class="fa fa-refresh"></i></button>
</div>
</div>
<table class="table table-client mt-4" style="word-break: break-all; word-wrap: break-word; white-space: pre-wrap;">
<thead>
<tr>
<th style="width: 70px">姓名</th>
<th>证件类型</th>
<th style="width: 140px; padding-left: 0px; padding-right: 0px; ">证件号码</th>
<th>董事会身份</th>
<th>管理层身份</th>
<th>是否股东</th>
<th>股东持股类型</th>
<th>股东持股比例(%</th>
<th style="width:45px; padding-left:0px;padding-right:0px;">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in dutyList3">
<td>{{item.ContactName}}</td>
<td>{{item.IdCardType}}</td>
<td style="padding-left:0px;padding-right:0px;">{{item.IdCardNo}}</td>
<td style="padding-left:0px;padding-right:0px;">{{item.IdentityOfTheBoardOfDirectors}}</td>
<td style="padding-left:0px;padding-right:0px;">{{item.ManagementIdentity}}</td>
<td style="padding-left:0px;padding-right:0px;">{{item.IsShareholder}}</td>
<td style="padding-left:0px;padding-right:0px;">{{item.ShareholdingByShareholdersType}}</td>
<td style="padding-left:0px;padding-right:0px;">{{item.ShareholdingByShareholdersRatio}}</td>
<td style="padding-left:0px;padding-right:0px;">
<template v-if="page.canEditList">
<button class="btn btn-primary btn-sm mr-2" style="min-width: 35px; display: inline-block; font-size: 12px; height: 22px; line-height: 16px; padding: 2px 2px 2px 2px;margin-right:0px!important;" type="button" v-on:click="editDutyDirector(item.EncryptId)">编辑</button>
</template>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else>
<div class="alert alert-danger">请先保存用户基本信息</div>
</div>
@@ -1,100 +0,0 @@
@{
Layout = null;
}
<div v-if="client.id>0">
<div class="row m-0 mt-3">
<div class="col-auto">
<span class="mr-1">文件类型:</span>
<select id="search_fileTypes" v-model="fileSearch.fileTypes" multiple>
<option v-for="item in viewData['文件类型']" v-bind:value="item.value">{{item.text}}</option>
</select>
</div>
<div class="col-auto">
<span class="mr-1">文件名:</span>
<input class="" id="search_fileName" v-model="fileSearch.fileName" type="text" autocomplete="off">
</div>
<div class="col-auto">
<span class="mr-1">日期:</span>
<vue-datepicker id="search_fileDate" v-bind:noholiday="true" v-model="fileSearch.fileDate" />
</div>
<div class="col">
<button class="btn btn-primary" type="button" v-on:click="filterFiles">查询</button>
<button class="btn btn-primary" type="button" v-on:click="addFile" v-if="page.canEditList">上传</button>
<button class="btn btn-primary" type="button" v-on:click="refreshFiles" title="重新加载文件列表信息"><i class="fa fa-refresh"></i></button>
</div>
</div>
<table class="table table-client mt-4">
<thead>
<tr>
<th>
文件类型
<img v-if="orderByFieldStr!=='FileTypeName'||orderByStr===''" v-on:click="orderTableByField('FileTypeName','asc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC" />
<img v-if="orderByFieldStr==='FileTypeName'&&orderByStr==='asc'" v-on:click="orderTableByField('FileTypeName','desc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==" />
<img v-if="orderByFieldStr==='FileTypeName'&&orderByStr==='desc'" v-on:click="orderTableByField('FileTypeName','')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=" />
</th>
<th>
文件名
<img v-if="orderByFieldStr!=='FileName'||orderByStr===''" v-on:click="orderTableByField('FileName','asc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC" />
<img v-if="orderByFieldStr==='FileName'&&orderByStr==='asc'" v-on:click="orderTableByField('FileName','desc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==" />
<img v-if="orderByFieldStr==='FileName'&&orderByStr==='desc'" v-on:click="orderTableByField('FileName','')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=" />
</th>
<th>
签署时间
<img v-if="orderByFieldStr!=='SignDate'||orderByStr===''" v-on:click="orderTableByField('SignDate','asc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC" />
<img v-if="orderByFieldStr==='SignDate'&&orderByStr==='asc'" v-on:click="orderTableByField('SignDate','desc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==" />
<img v-if="orderByFieldStr==='SignDate'&&orderByStr==='desc'" v-on:click="orderTableByField('SignDate','')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=" />
</th>
<th>
协议编号
<img v-if="orderByFieldStr!=='ProtocolNumber'||orderByStr===''" v-on:click="orderTableByField('ProtocolNumber','asc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC" />
<img v-if="orderByFieldStr==='ProtocolNumber'&&orderByStr==='asc'" v-on:click="orderTableByField('ProtocolNumber','desc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==" />
<img v-if="orderByFieldStr==='ProtocolNumber'&&orderByStr==='desc'" v-on:click="orderTableByField('ProtocolNumber','')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=" />
</th>
<th>
文件说明
<img v-if="orderByFieldStr!=='FileDesc'||orderByStr===''" v-on:click="orderTableByField('FileDesc','asc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC" />
<img v-if="orderByFieldStr==='FileDesc'&&orderByStr==='asc'" v-on:click="orderTableByField('FileDesc','desc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==" />
<img v-if="orderByFieldStr==='FileDesc'&&orderByStr==='desc'" v-on:click="orderTableByField('FileDesc','')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=" />
</th>
<th>
日期
<img v-if="orderByFieldStr!=='BookTime'||orderByStr===''" v-on:click="orderTableByField('BookTime','asc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC" />
<img v-if="orderByFieldStr==='BookTime'&&orderByStr==='asc'" v-on:click="orderTableByField('BookTime','desc')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==" />
<img v-if="orderByFieldStr==='BookTime'&&orderByStr==='desc'" v-on:click="orderTableByField('BookTime','')" style="width: 20px; height: 20px;cursor:pointer;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=" />
</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in groupingFiles" v-bind:class="item.bgClass">
<td v-bind:class="{dropline:item.HasSentDrop}" style="width: 115px; padding-left: 0px; padding-left: 35px;text-align:left; " :title="item.FileTypeName">{{item.FileTypeName.length>5?item.FileTypeName.substring(0,5)+'...':item.FileTypeName}}</td>
<td v-bind:key="viewState.fileUpdateKey" style="width: 300px; padding-left: 0px; padding-right: 0px; ">
<span>{{item.FileName}}</span>
<template v-if="page.isSecuritiesEnvironment">
<i class="fa fa-link yl-tooltip" v-bind:title="'签署版本: ' + item.SignType + '\n' + item.ReportorRole + '填报'" v-if="item.FileTypeName==='主协议附件(PDF)'"></i>
<i class="fa fa-link yl-tooltip" v-bind:title="'关联协议: ' + item.MainProtocolNumber" v-if="item.MainProtocolNumber!==''"></i>
</template>
</td>
<td style="width: 90px; padding-left: 0px; padding-right: 0px; ">{{item.SignDate}}</td>
<td style="width: 90px; padding-left: 0px; padding-right: 0px; ">{{item.ProtocolNumber}}</td>
<td style="width: 90px; padding-left: 0px; padding-right: 0px; word-break:break-all;"><span>{{item.FileDesc}}</span></td>
<td style="width: 150px; padding-left: 0px; padding-right: 0px; ">{{item.BookTime}}</td>
<td style="width:115px; padding-left:0px;padding-right:0px; ">
<button class="btn btn-primary" style="min-width:35px;display:inline-block; font-size:12px; height:22px;line-height:16px; padding:2px 2px 2px 2px;" type="button" v-on:click="showFile(item)">预览</button>
<button class="btn btn-primary" style="min-width: 35px; display: inline-block; font-size: 12px; height: 22px; line-height: 16px; padding: 2px 2px 2px 2px;" type="button" v-on:click="downloadFile(item)">下载</button>
<template v-if="page.canEditList">
<button class="btn btn-primary" style="min-width: 35px; display: inline-block; font-size: 12px; height: 22px; line-height: 16px; padding: 2px 2px 2px 2px;" type="button" v-on:click="abandonFile(item)" v-if="item.CanDrop">废止</button>
<button class="btn btn-primary" style="min-width: 35px; display: inline-block; font-size: 12px; height: 22px; line-height: 16px; padding: 2px 2px 2px 2px;" type="button" v-on:click="removeFile(item)" v-if="item.CanDelete">删除</button>
<button class="btn btn-primary" style="min-width: 35px; display: inline-block; font-size: 12px; height: 22px; line-height: 16px; padding: 2px 2px 2px 2px;" type="button" v-on:click="recoverFile(item)" v-if="item.CanBack">{{item.OptState===OptFlagsEnum.D?"解除废弃":"还原"}}</button>
</template>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else>
<div class="alert alert-danger">请先保存用户基本信息</div>
</div>
@@ -1,44 +0,0 @@
@{
Layout = null;
}
<div v-if="client.id>0">
<div class="row m-0">
<div class="col">产品投资人列表</div>
<div class="col-auto" style="min-width:300px;">
<button class="btn btn-primary" type="button" v-on:click="addInvestor" v-if="page.canEditList">新增投资人</button>
<button class="btn btn-primary" type="button" v-on:click="refreshInvestors" title="刷新"><i class="fa fa-refresh"></i></button>
</div>
</div>
<table class="table table-client mt-4">
<thead>
<tr>
<th>产品投资人</th>
<th>适当性类型</th>
<th>产品权益比例</th>
<th>操作者</th>
<th>备注</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr v-for="item in investorList">
<td>{{item.Investor}}</td>
<td>{{item.EligibilityType}}</td>
<td>{{item.ShareRate * 100}}%</td>
<td>{{item.OptName}}</td>
<td>{{item.Comments}}</td>
<td>
<template v-if="page.canEditList">
<button class="btn btn-primary btn-sm mr-2" type="button" v-on:click="editInvestor(item.EncryptId)">编辑</button>
<button class="btn btn-primary btn-sm" type="button" v-on:click="removeInvestor(item.EncryptId)">删除</button>
</template>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else>
<div class="alert alert-danger">请先保存用户基本信息</div>
</div>
@@ -1,88 +0,0 @@
@model QuotationsExportModel
@{
Layout = null;
}
<!---此视图用户PDF生成,故必须使用内联样式-->
<style>
table { border-spacing: 0; border-collapse: collapse; background-color: transparent; }
tr { page-break-inside: avoid; }
td, th { padding: 1px 0; text-align: left; }
.table { border-collapse: collapse !important; width: 100%; max-width: 100%; margin-bottom: 2px; border: 1px solid #0a0c0f;border-top:0;border-right:0; }
.table th, .table td { vertical-align: middle; text-align: center; border-top: 1px solid #0a0c0f; border-right: 1px solid #0a0c0f; font-size: 11px; }
.tr-index0 { background: #ecedec; }
.td-normal { width: 12.4%; }
.td-assettype { background: #fff; vertical-align: middle !important; width: 12.4%; }
.td-buy-price { background: #f4af85; width: 12.4%; }
.td-sell-price { background: #a9d08f; width: 12.4%; }
</style>
<!----STYLE-END---->
<table class="table">
<!--IText不支持thead标签-->
<tr style="height: 50px;">
<th rowspan="1" colspan="7" style="text-align:left;">
<img style="width:250px;height:50px;" src="@(Model.LogoImgUrl)" />
</th>
<th rowspan="3" colspan="1" style="text-align: center;">
<img style="width:112px;height:112px;" src="@(Model.ErWeiMaImgUrl)" />
</th>
</tr>
<tr style="height: 40px;">
<th colspan="7" style="text-align:center;font-weight:600;font-size:x-large;">申银万国智富投资有限公司</th>
</tr>
<tr>
<td colspan="4" style="height: 30px;text-align:left;">
&nbsp;&nbsp;&nbsp;报价日期:&nbsp;&nbsp;@(Model.ValueDate.ToString("yyyy/MM/dd"))
</td>
<td colspan="3" style="height: 30px;text-align:center;font-size:large;">一个月平值场外报价表</td>
</tr>
<tr style="text-align: center;">
<td rowspan="2" class="td-normal">类别</td>
<td rowspan="2" class="td-normal">品种</td>
<td rowspan="2" class="td-normal">合约</td>
<td rowspan="2" class="td-normal">标的价格</td>
<td colspan="2" class="td-buy-price" style="width:24.8%;">客户卖价</td>
<td colspan="2" class="td-sell-price" style="width:24.8%;">客户买价</td>
</tr>
<tr style="text-align: center;">
<td class="td-buy-price">绝对值</td>
<td class="td-buy-price">百分比%</td>
<td class="td-sell-price">绝对值</td>
<td class="td-sell-price">百分比%</td>
</tr>
<!--IText不支持tbody标签-->
@{ var tIndex = 0;}
@foreach (var quo in Model.selectedQuotation)
{
var isFirst = true;
foreach (var item in quo.flat_price_quotations)
{
string showName = item.ShortName.TrimToNull() ?? item.UnderlyingType;
<tr class="tr-index@(tIndex++%2)">
@if (isFirst)
{
isFirst = false;
<td rowspan="@(quo.flat_price_quotations.Count)" class="td-assettype">@(quo.AssetType)</td>
}
<td class="td-normal">@(showName)</td>
<td class="td-normal">@(item.UnderlyingCode)</td>
<td class="td-normal">@(item.SpotPrice)</td>
<td class="td-buy-price">@(item.BuyOptionPrice?.ToString("N"))</td>
<td class="td-buy-price">@((item.BuyOptionPrice / item.SpotPrice)?.ToString("P"))</td>
<td class="td-sell-price">@(item.SellOptionPrice?.ToString("N"))</td>
<td class="td-sell-price">@((item.SellOptionPrice / item.SpotPrice)?.ToString("P"))</td>
</tr>
}
}
</table>
<table style="width: 100%;">
<tr>
<td style="font-size:12px; text-align:left; width: 75%;">免责声明:此价格为参考价格,具体承做请详细咨询申银万国智富投资有限公司。</td>
<td style="font-size:12px; text-align:center; width: 25%;">到期日:@(Model.EndDate?.ToString("yyyy/MM/dd"))</td>
</tr>
</table>
@@ -1,163 +0,0 @@
@model List<YLErp.Modules.SuperviseReportModule.SAC.Common.SacInfo>
@{
Layout = "~/Views/Shared/_LayoutMini.cshtml";
var pageObj = new
{
SacInfoList = Model,
ShowMessage = ViewBag.ShowMessage,
ColShow = true,
};
}
@section JS{
<script>
var pageObj = @Json.Serialize(pageObj);
var level = 1;
function formatSubMaps(obj,expanded = true) {
if (!obj.id) {
obj["id"] = level+"";
obj["parent"] = "";
}
level++;
obj["level"] = obj["id"].split('_').length - 1;
obj["loaded"] = true;
obj["isLeaf"] = !(obj.SubMaps && obj.SubMaps.length > 0);
obj["expanded"] = expanded;
if (obj.SubMaps && obj.SubMaps.length > 0) {
obj.SubMaps.forEach(function (item) {
item["parent"] = obj.id;
item["id"] = obj.id + "_" + level;
formatSubMaps(item, true);
level++;
});
}
}
function formatToArray(obj) {
var array = [];
array.push(obj);
if (obj.SubMaps) {
obj.SubMaps.forEach(function (item) {
$.merge(array, formatToArray(item));
});
}
return array;
}
$(function () {
debugger;
var list = [];
pageObj.SacInfoList.forEach(Obj => {
formatSubMaps(Obj);
$.merge(list, formatToArray(Obj));
})
pageObj.SacInfoList = list;
var obj = {
datatype: 'jsonstring',
datastr: pageObj,
height: '660',
caption: '点击第一列可以展开或折叠',
colModel: GetColModel(),
ExpandColClick: true,
treeGrid: true,
ExpandColumn: "FieldName_CN",
treeGridModel: "adjacency",
jsonReader: {
repeatitems: false,
root: "SacInfoList"
},
gridComplete: function () {
$("#loadTip").hide();
},
};
var g_grid = jQuery('#listGrid').jqGrid(obj);
g_grid.jqGrid('setGroupHeaders', {
useColSpanStyle: true,
groupHeaders: [
{
startColumnName: 'FieldName_CN', numberOfColumns: 4, titleText: '<span style="margin: 0 80px;">接口文档信息</span><a class="aButton" href="#" onclick="foldCol()">折叠列</a>' },
]
});
})
function foldCol() {
var g_grid = jQuery('#listGrid')
if (pageObj.ColShow) {
g_grid.hideCol(["FieldLength", "FieldDescription"])
pageObj.ColShow = false;
$(".aButton").text("展开列");
} else {
g_grid.showCol(["FieldLength", "FieldDescription"])
pageObj.ColShow = true;
$(".aButton").text("折叠列");
}
}
function GetColModel() {
return [
{ name: 'id', label: 'id', width: 150, sortable: false, editable: true, hidden: true, optionHide: true },
{
name: 'FieldName_CN', label: '字段描述', width: 280, sortable: false, editable: true},
{
name: 'FieldName', label: '字段名', width: 280, sortable: false, editable: true,
formatter: function (cellValue, options, rowObject) {
var result = cellValue;
if (rowObject.Index >= 0) {
result += "[" + (rowObject.Index) + "]";
}
return result;
} },
{ name: 'FieldLength', label: '长度', width: 80, sortable: false, editable: true },
{
name: 'FieldDescription', label: '说明', width: 280, sortable: false, editable: true, formatter: formatToBr },
{ name: 'FieldValue', label: '值', width: 280, sortable: false, editable: true },
{ name: 'Message', label: '提示信息', width: 280, sortable: false, editable: true, hidden: !pageObj.ShowMessage, optionHide: !pageObj.ShowMessage, formatter: formatToBr },
];
}
function formatToBr(cellValue, options, rowObject) {
var result = (cellValue || "").replaceAll("\r\n", "<br />");
return result;
}
</script>
}
<style>
table tr td:not(:nth-child(2)) {
white-space: normal !important;
line-break: anywhere;
height: auto !important;
}
.aButton {
color: #007bff !important;
text-decoration: underline !important;
}
th, td {
font: initial !important;
}
.tree-wrap .tree-wrap-ltr {
display: inline-block;
}
.ui-icon .ui-icon-document-b .tree-leaf .treeclick {
position: relative;
}
.ui-icon.treeclick .ui-icon-triangle-1-s .tree-minus {
position: relative;
}
.ui-icon .treeclick .ui-icon-triangle-1-e .tree-plus {
position: relative;
}
.ui-jqgrid-bdiv {
overflow-y: overlay;
}
.main-content {
text-align: center;
}
#gbox_listGrid {
margin: 0px auto;
}
</style>
@Html.Raw(JqGridSimple.OutTable())
<div id="loadTip"><span>数据加载中,页面可能会卡住,请耐心等待...</span></div>
@@ -1,47 +0,0 @@
@{
//长江数据采集页面
ViewBag.Title = "衍生品客户资金表";
Layout = "~/Views/Shared/_MainLayout.cshtml";
var pageObj = new
{
valueDate = ViewBag.valueDate,
};
}
@section CSS{
<style>
#DateValueDate {
width: 152px !important;
font-size: 1rem !important;
}
</style>
}
@section JS{
<script src="~/Scripts/app/superviseReport/clientCash.js?v=@HtmlUtil.JsVersion"></script>
<script type="text/javascript">
var pageObj = @Json.Serialize(pageObj);
$(function () {
var PostData = { ValueDate: pageObj.valueDate };
@Html.Raw(JqGridSimple.OutGrid("/supervise_report/superviseClientCashQuery"));
});
</script>
}
<style>
.no-skin {
position: static !important;
}
</style>
<div class="searchdiv">
@Html.SearchDate("ValueDate", "日期")
@*@Html.MyAceDropdownInput("DataMode", "报送类型", new List<SelectListItem>() { new SelectListItem() { Text = "全量客户", Selected = true }, new SelectListItem() { Text = "有持仓" }, new SelectListItem() { Text = "有资金" } }, false)*@
@MyControls.SearchBtn()
<label style="float:right">
@MyControls.Btn("批量确认", "BatchSuperviseClientCash('update')")
@MyControls.Btn("批量删除", "BatchSuperviseClientCash('delete')")
</label>
@*@MyControls.Btn("导出", "exportToFile()")*@
</div>
@Html.Raw(JqGridSimple.OutTable())
@@ -1,50 +0,0 @@
@{
//长江数据采集页面
ViewBag.Title = "场外业务持仓表";
Layout = "~/Views/Shared/_MainLayout.cshtml";
var pageObj = new
{
valueDate = ViewBag.valueDate,
};
}
@section CSS{
<style>
#DateValueDate {
width: 152px !important;
font-size: 1rem !important;
}
</style>
}
@section JS{
<script src="~/Scripts/app/superviseReport/cj_positionInfo.js?v=@HtmlUtil.JsVersion"></script>
<script type="text/javascript">
var pageObj = @Json.Serialize(pageObj);
$(function () {
var PostData = { ValueDate: pageObj.valueDate, DataSource: "全量"};
@Html.Raw(JqGridSimple.OutGrid("/supervise_report/supervisePositionQuery"));
});
</script>
}
<style>
.no-skin {
position: static !important;
}
</style>
<div class="searchdiv">
@Html.SearchDate("ValueDate", "日期")
<div class="search-group">
<label class="control-label name-input" for="formGroupInputLarge">预置条件</label>
<select class="select" id="volType">
@Html.Raw(GlobalData.GetOptions(new[] { "全量", "不为零" }));
</select>
</div>
@MyControls.SearchBtn()
<label style="float:right">
@MyControls.Btn("批量确认", "BatchSupervisePosition('update')")
@MyControls.Btn("批量删除", "BatchSupervisePosition('delete')")
</label>
</div>
@Html.Raw(JqGridSimple.OutTable())
-7
View File
@@ -1,7 +0,0 @@
<script>
function startPicktrade() {
var url = "/trade/PickSingletrade/";
main.open("选择交易",url);
}
</script>
@MyControls.Btn("选择交易", "startPicktrade()")
@@ -1,74 +0,0 @@
@*交易编辑--交易简讯*@
@{
Layout = null;
}
<div class="modal" tabindex="-1" id="modalTradeAbstract" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">交易摘要</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body" style="padding-left:27%;">
<pre style="line-height: 26px;white-space: pre-wrap;" ></pre>
</div>
<div class="modal-footer">
<div class="mx-auto">
<a download="Trade_交易摘要_@(DateTime.Now.ToString("yyyyMMddHHmmss")).txt"
href="#" class="btn btn-primary btn-save" onfocus="this.blur();"
onclick="return ;">保存</a>
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
</div>
<script>
(function (global) {
function TradeAbstractInfo() {
}
function openLayer(showOptions) {
let url = "/trade/tradeview?enid=" + this.EncryptId;
main.open("查看交易", url, {
end: function () {
if (showOptions.next) {
TradeAbstractInfo.show(showOptions.next);
} else {
layer.closeAll();
}
}
});
}
function onModalHide(showOptions) {
$('#modalTradeAbstract').off("hide.bs.modal");
if (!this.showTradeView) return;
let url = "/trade/tradeview?enid=" + this.EncryptId;
if (!window.parent || window.parent === window) {
openLayer(showOptions);
} else {
window.location.href = "/trade/tradeview?enid=" + this.EncryptId;;
}
}
//options:{abstractInfo:string,EncryptId:string,showTradeView:boolean}
TradeAbstractInfo.show = function (showOptions) {
let text = showOptions.abstractInfo;
let index = text.indexOf('####')
var headText = text.substring(0, index);
var bodyText = text.substring(index + 4).trim();
let $content = $('#modalTradeAbstract').find('.modal-content:first');
$content.children('.modal-body').find("pre:first").text(bodyText);
$content.children('.modal-footer').find("a.btn-save").attr('href', "data:text/plain;charset=utf-8,\uFEFF" + encodeURIComponent(headText + bodyText));
$('#modalTradeAbstract').modal('show').on('hide.bs.modal', onModalHide.bind(showOptions));
};
global.TradeAbstractInfo = TradeAbstractInfo;
}(window));
</script>
@@ -1,6 +0,0 @@
<script>
function startPicktrade_group() {
$("#iframetrade_group").attr("src", "/trade_group/PickSingletrade_group/");
$('#modal-formtrade_group').modal('show');
}
</script>
-1
View File
@@ -25,7 +25,6 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="6.0.9" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
<PackageReference Include="NCrontab.Signed" Version="3.3.2" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.1.5" />
<PackageReference Include="RazorEngineCore" Version="2022.8.1" />
<PackageReference Include="RazorLight-rpm" Version="3.0.0" />
@@ -1,73 +0,0 @@
//保存配置
function SaveValue(id, blEncodeURI) {
var $e = $('#config' + id);
var value = '';
if ($e.is("select") || $e.attr("type") === "text" || $e.is("textarea")) {
value = $e.val();
if (blEncodeURI) value = encodeURIComponent(value);
if ($e.data("value") === value) {
return;
}
} else if ($e.attr("type") === "checkbox") {
value = $e.prop("checked").toString();
}
else {
alert("不支持");
return;
}
main.post(saveConfigValueUrl, { name: $e.attr("name"), value: value }).done(function (resp) {
$e.data("value", value);
$('#respMsg').text(resp.data);
});
}
function OnInputKeyDown(blEncodeURI) {
if (event.keyCode === 13) {
SaveValue(blEncodeURI);
}
}
//重置配置
function ResetConfig() {
main.post(resetConfigValueUrl).done(function (resp) {
$('#respMsg').text(resp.data);
});
}
var ueditor, ueditorConfigId;
function showUeditorConfig(id, title) {
ueditorConfigId = id;
$('.modal-title', '#ueditorModal').text(title || '配置');
$('#ueditorModal').modal('show');
}
function saveUeditorConfig() {
let cont = ueditor.getContent();
$('#config' + ueditorConfigId).val(cont).blur();
$('#ueditorModal').modal('hide');
}
$(function () {
$('#ueditorModal').on('shown.bs.modal', function () {
function insertHtml(editor) {
let content = $('#config' + ueditorConfigId).val() || '';
ueditor.execCommand('insertHtml', content);
}
if (ueditor) {
ueditor.reset();
ueditor.setContent('');
insertHtml();
} else {
ueditor = UE.getEditor('editor', {
autoHeight: false,
wordCount: false,
autoHeightEnabled: false,
initialFrameHeight: 500
});
ueditor.ready(insertHtml);
}
});
});
-113
View File
@@ -1,113 +0,0 @@
var sqlViewer = CodeMirror.fromTextArea(document.getElementById('dbContentText'), {
mode: "text/x-mysql",
indentWithTabs: true,
smartIndent: true,
lineNumbers: true,
matchBrackets: true,
autofocus: true,
readOnly: true
});
var vue = new Vue({
el: "#dbUpdateDiv",
data: {
updateList: [],
checkAll: false,
filter: { version: '', dbschema: '', upstate: '', versionItems: [] }
},
mounted: function () {
this.getUpdateList();
},
methods: {
//获取升级列表列表
getUpdateList() {
var thisObj = this;
main.post("/Admin/DbUpdate/AjaxGetUpdateList").done(function (resp) {
thisObj.checkAll = false;
thisObj.updateList = resp.data;
let verSet = new Set();
Object.assign(thisObj.filter, { versionItems: [], dbschemaItems: [] })
thisObj.updateList.forEach(x => {
x.checked = false;
verSet.add(x.Version);
});
thisObj.filter.versionItems = Array.from(verSet);
}).fail(function () {
main.alert("加载失败");
});
},
changeItemChecked() {
this.checkAll = this.updateList.every(x => x.checked);
},
changeAllChecked() {
let checked = this.checkAll;
this.updateList.forEach(x => {
x.checked = checked;
});
},
//查看脚本内容
viewUpdateContent(upkey) {
if (upkey) {
upkey = [upkey];
} else {
upkey = this.updateList.filter(x => x.checked).map(x => x.UpKey);
if (!upkey.length) {
return main.alert("请至少选择一项!");
}
}
main.post("/Admin/DbUpdate/AjaxGetUpdateContent", { upKeyList: upkey }).done(function (resp) {
sqlViewer.getDoc().setValue(resp.data);
$("#dbContentModal").modal('show');
sqlViewer.refresh();
});
},
//执行脚本内容
executeUpdate(item) {
let confirmMsg, upkeyList, upMap = {}, isUpdateDone = item === "isUpdateDone";
if (item && !isUpdateDone) {
upkeyList = [item.UpKey];
upMap[item.UpKey] = item;
confirmMsg = item.UpState < 1 ? "确定要执行更新吗?" : "确定要重新执行吗?";
} else {
upkeyList = this.updateList.filter(x => x.checked).map(x => {
upMap[x.UpKey] = x; return x.UpKey;
});
if (!upkeyList.length) {
return main.alert("请至少选择一项!");
}
confirmMsg = "确定要执行批量更新吗?";
}
main.confirm(confirmMsg, function () {
$("#waitMeModal").modal("show");
let postData = { upKeyList: upkeyList, isUpdateDone: isUpdateDone };
main.post("/Admin/DbUpdate/AjaxExecuteUpdate", postData).done(function (resp) {
resp.data.forEach(x => {
let item = upMap[x.UpKey];
if (item) {
item.UpState = x.UpState;
item.UpResult = x.UpResult;
}
});
}).always(() => {
$("#waitMeModal").modal("hide");
});
});
},
itemStatusClass(item) {
if (item.UpState < 0) {
return "text-danger";
}
if (item.UpState > 0) {
return "text-muted";
}
},
isShowItem(item) {
return (this.filter.version && item.Version !== this.filter.version)
|| (this.filter.dbschema && item.DbSchema !== this.filter.dbschema)
|| (this.filter.upstate == true && item.UpState > 0) ? "display:none" : "display:table-row";
}
}
});
@@ -1,282 +0,0 @@
// 查询自定义结构
function queryStructure() {
var name = $("#UserDefineStructure :selected").text();
main.post("/UserDefinedStructure/QueryUserDefinedStructure", { structureName: name }).done(function (res) {
if (res != null) {
$("#StructureName").val(res.StructureName);
$("#StructureCode").val(res.StructureCode);
$("#PricingMethod").val(res.PricingMethod);
$("#userDefinedFields").empty();
var li = "";
var selectId = "";
for (var i = 0; i < res.Fields.length; ++i) {
selectId = "fieldDefSelect" + res.Fields[i].FieldName;
li = "";
li += "<li><input type='text' style='width:35%' value='"
li += res.Fields[i].FieldDisplayName;
li += "'/><input type='text' style='width:35%' value='";
li += res.Fields[i].FieldName;
li += "'/><select id='";
li += selectId;
li += "' style='width:20%'><option value='Bool'>Bool</option><option value='Double'>Double</option><option value='String'>String</option><option value='Date'>Date</option></select>";
li += "<a href='#' class='delete'><span class='glyphicon glyphicon-remove'></span></a>";
li += "</li>";
$("#userDefinedFields").append(li);
$("#" + selectId).get(0).selectedIndex = res.Fields[i].FieldType;
}
// 设置payoff源代码的显示
$("#PayoffDescription").text(res.PayoffDescription);
editor.getDoc().setValue(res.PayoffDescription);
editor.refresh();
$("#PriceDistribution").val(res.PriceDistribution);
$(".delete").click(function () {
$(this).parent().remove();
});
// 刷新“定价测试”区域的自定义字段
refreshNewFieldInPricingTest(res.Fields);
$("#StructureName").attr("disabled", true);
}
});
}
// 新建一个结构
function createStructure() {
$("#StructureName").attr("disabled", false);
$("#StructureName").val("");
$("#StructureCode").val("");
$("#PricingMethod").val("无");
$("#userDefinedFields").empty();
var sampleCode = "\
/// \n\
/// 预处理蒙特卡洛模拟的参数,以获得更高的模拟效率。\n\
/// 默认仅生成每一个观察日对应的时间序列\n\
/// \n\
/// valueDate: 估值日期\n\
/// r: 无风险利率\n\
public override float[] PrepareMC(Date valueDate, double r)\n\
{\n\
return base.PrepareMC(valueDate, r);\n\
}\n\
\n\
/// \n\
/// 蒙特卡洛模拟中对单一价格路径的处理函数\n\
/// \n\
/// st: 价格序列\n\
/// r: 无风险利率\n\
public override float DiscountedPayoffForOnePath(float[] st, float r)\n\
{\n\
return (float)0.0;\n\
}";
editor.getDoc().setValue(sampleCode);
editor.refresh();
}
// 结构定义新增字段
function addNewField() {
var li = "<li><input type='text' style='width:35%'/><input type='text' style='width:35%'/>";
li += "<select style='width:20%'><option value='Bool'>Bool</option><option value='Double'>Double</option><option value='String'>String</option><option value='Date'>Date</option></select>";
li += "<a href='#' class='delete'><span class='glyphicon glyphicon-remove'></span></a></li>"
$("#userDefinedFields").append(li);
$(".delete").click(function () {
$(this).parent().remove();
});
}
// 从当前页面获取自定义结构信息
function getCurrentStructure() {
var structure = {};
structure.StructureName = $("#StructureName").val();
structure.StructureCode = $("#StructureCode").val();
structure.PricingMethod = $("#PricingMethod option:selected").val();
structure.FieldDefinitions = getUserDefinedFields();
structure.PayoffDescription = editor.getDoc().getValue();
structure.PriceDistribution = $("#PriceDistribution option:selected").val();
return structure;
}
// 保存自定义结构
function saveStructure() {
var structure = getCurrentStructure();
var saveNew = !$("#StructureName").prop("disabled");
main.post("/UserDefinedStructure/SaveUserDefinedStructure", { req: structure, saveNew: saveNew }).done(function (res) {
window.location.reload();
});
}
// 删除自定义结构
function deleteStructure() {
var name = $("#StructureName").val();
main.confirm("确认删除" + name + "吗?",
function () {
main.post("/UserDefinedStructure/DeleteStructureByName", { name: $("#StructureName").val() }).done(function (res) {
window.location.reload();
});
}
);
}
// 获取自定义字段列表
function getUserDefinedFields() {
var fields = [];
$("#userDefinedFields").find("li").each(function () {
var field = {};
field.FieldDisplayName = $(this).find("input").eq(0).val();
field.FieldName = $(this).find("input").eq(1).val();
field.FieldType = $(this).find("select").val();
fields.push(field);
});
return JSON.stringify(fields);
}
// 在定价测试中刷新结构字段
function refreshFields() {
//var name = $("#UserDefineStructure :selected").text();
var name = $("#StructureName").val();
main.post("/UserDefinedStructure/QueryUserDefinedStructure", { structureName: name }).done(function (res) {
refreshNewFieldInPricingTest(res.Fields);
});
}
// 在定价测试中刷新结构字段
function refreshNewFieldInPricingTest(fields) {
$("#divTestOptionFields").empty();
var html = "";
var inputId = "";
for (var i = 0; i < fields.length; ++i) {
inputId = "Test" + fields[i].FieldName;
html += "<div class='search-group'><label class='search-label'>";
html += fields[i].FieldDisplayName;
html += "</label>";
if (fields[i].FieldType == 3) {
html += "<input id='";
html += inputId;
html += "' class='search-input datepicker' type='text'></div>";
} else if (fields[i].FieldType == 0) {
html += "<select id='"
html += inputId;
html += "'><option value='true'>是</option><option value='false'>否</option></select></div>";
} else {
html += "<input id='";
html += inputId;
html += "' class='search-input' type='text'></div>";
}
}
$("#divTestOptionFields").append(html);
ResetDatePicker();
}
// 编译自定义的结构
function compileSourceCode() {
var structure = getCurrentStructure();
main.post("/UserDefinedStructure/CompileUserDefineSourceCode", { req: structure }).done(function (res) {
});
}
// 试定价
function calcStructure() {
var structure = getCurrentStructure();
var request = {};
request.req = structure;
request.baseFieldStr = getBaseFieldsForPricingTest();
request.customizedFieldStr = getCustomizedFieldsForPricingTest(structure.FieldDefinitions);
request.valueDate = "2020-07-28";
request.spot = 1;
request.r = 0.05;
request.q = 0.05;
request.vol = 0.25;
request.calcGreeks = $("#checkBoxCalcGreeks").is(":checked");
main.post("/UserDefinedStructure/PricingTestUserDefineSourceCode", request).done(function (res) {
$("#resultPv").text(isNaN(res.Pv) ? "0.00" : res.Pv.toFixed(2));
$("#resultDelta").text(isNaN(res.Delta) ? "0.00" : res.Delta.toFixed(2));
$("#resultGamma").text(isNaN(res.Gamma) ? "0.00" : res.Gamma.toFixed(2));
$("#resultVega").text(isNaN(res.Vega) ? "0.00" : res.Vega.toFixed(2));
$("#resultTheta").text(isNaN(res.Theta) ? "0.00" : res.Theta.toFixed(2));
$("#resultRho").text(isNaN(res.Rho) ? "0.00" : res.Rho.toFixed(2));
});
}
// 为试定价获取基础字段
function getBaseFieldsForPricingTest() {
var fields = {};
fields.StartDate = $("#TestStartDate").val();
fields.MaturityDate = $("#TestMaturityDate").val();
fields.ObservationDateStr = $("#setObservationDatesBtn").data("observationdates");
return JSON.stringify(fields);
}
// 为试定价获取自定义字段
function getCustomizedFieldsForPricingTest(defStr) {
var fields = [];
var fieldDefs = JSON.parse(defStr);
fieldDefs.forEach(function (val, i) {
var field = {};
field.Name = val.FieldName;
field.Type = val.FieldType;
field.Value = $("#Test" + val.FieldName).val();
fields.push(field);
});
return JSON.stringify(fields);
}
// 发布结构
function publishStructure() {
var structure = getCurrentStructure();
main.post("/UserDefinedStructure/PublishUserDefinedStructure", { req: structure }).done(function (res) {
window.location.reload();
});
}
// 设置观察日
function setObservationDates(thisobj, title1 = "", title2 = "", isTitle1Percent = false, isTitle2Percent = false, defaultTitle1Value = 0, defaultTitle2Value = 0) {
var startTime = $("#TestStartDate").val();
var endTime = $("#TestMaturityDate").val();
if (main.isEmpty(startTime)) {
main.message("请输入成交日期");
return false;
}
if (main.isEmpty(endTime)) {
main.message("请输入到期日期");
return false;
}
var observationDates = $(thisobj).data("observationdates");
var observationNum = $(thisobj).data("observationnum");
var observationUnit = $(thisobj).data("observationunit");
var observationHolidayType = $(thisobj).data("observationholidaytype");
var alignEnd = true;
var btnId = $(thisobj).attr('id');
sessionStorage.setItem(btnId + "_observationdates", observationDates);
layer.open({
type: 2,
title: "设置自定义观察日",
shadeClose: false,
shade: 0.4,
area: ['500px', '560px'],
content: "/trade/tradeObservationDates?observationNum=" + observationNum + "&observationUnit=" + observationUnit + "&observationHolidayType=" + observationHolidayType + "&startTime=" + startTime + "&endTime=" + endTime + "&alignEnd=" + alignEnd + "&btnId=" + btnId + "&title1=" + title1 + "&title2=" + title2 + "&isTitle1Percent=" + isTitle1Percent + "&isTitle2Percent=" + isTitle2Percent + "&defaultTitle1Value=" + defaultTitle1Value + "&defaultTitle2Value=" + defaultTitle2Value
});
}
// 设置观察日窗口返回的函数
function getObservationDatesSetting(observationNum, observationUnit, observationHolidayType, observationDates, alignEnd, btnId) {
$("#" + btnId).data("observationdates", observationDates);
$("#" + btnId).data("observationnum", observationNum);
$("#" + btnId).data("observationunit", observationUnit);
$("#" + btnId).data("observationholidaytype", observationHolidayType);
$("#" + btnId).data("alignend", alignEnd);
}
// 重置页面上所有日期控件
function ResetDatePicker() {
$(".datepicker").datepicker({
changeMonth: true,
changeYear: true,
showButtonPanel: true,
showOtherMonths: true,
selectOtherMonths: true
});
};
@@ -1,462 +0,0 @@
var g_grid = {};
$(function () {
var PostData = {};
//控件选择时的触发事件
main.setTradeDatePicker("", "#ValueDate", page.calcDate, function (selectedDate) {
if (selectedDate) {
$("#ValueDateFrom").datepicker("option", "maxDate", selectedDate);
}
});
main.setTradeDatePicker("", "#ValueDateFrom", page.calcDate, function (selectedDate) {
if (selectedDate) {
$("#ValueDate").datepicker("option", "minDate", selectedDate);
}
});
//手动修改时的触发事件
$("#ValueDate").change(function () {
$("#ValueDateFrom").datepicker("option", "maxDate", $("#ValueDate").val());
});
$("#ValueDateFrom").change(function () {
$("#ValueDate").datepicker("option", "minDate", $("#ValueDateFrom").val());
});
//默认初始值赋值逻辑
$("#ValueDate").val(page.EndTime || page.calcDate);
$("#ValueDateFrom").val(page.StartTime && page.EndTime ? page.StartTime : '');
PostData.StructureType = page.StructureType;
PostData.ValueDateFrom = $("#ValueDateFrom").val();
PostData.ValueDate = $("#ValueDate").val();
PostData.ClientId = $("#ClientId").val();
var grid = jQuery('#listGrid').jqGrid({
url: '/swaptrade2/clientEodSwapPositionQuery',
datatype: 'json',
height: 'auto',
width: '96%',
autowidth: false,
shrinkToFit: false,
viewrecords: true,
jsonReader: { repeatitems: false },
caption: '',
mtype: 'POST',
onSortCol: onSortCol,
postData: PostData,
afterInsertRow: AfterInsertRow,
onSelectRow: rowclick,
ondblClickRow: rowdblclick,
colModel: colModelGrid,
pager: jQuery('#pagerGrid'),
pagerpos: 'left',
rowNum: 100,
rowList: [100, 1000],
loadComplete: gridComplete,
grouping: true
});
g_grid = jQuery('#listGrid');
function keyEnter(event) {
try {
var e = event ? event : (window.event ? window.event : null);
if (e.keyCode === 13) {
SearchClick(true);
}
} catch (e) {
//
}
}
document.onkeydown = keyEnter;
try {
SetAceDropDown();
} catch (e) {
//
}
function AfterInsertRow(rowid, aData) {
}
});
function SearchClick(isSearchclick) {
SearchTable(isSearchclick);
}
function SearchTable(isSearchclick) {
//搜索持仓明细
searchPositionDetials(isSearchclick);
}
//搜索持仓明细
function searchPositionDetials(isSearchclick) {
var listGrid = $('#listGrid');
listGrid.appendPostData({ ClientId: $("#ClientId").val() });
listGrid.appendPostData({ ValueDate: $("#ValueDate").val() });
if ($("#ParentFlag").prop("checked"))
listGrid.appendPostData({ ParentFlag: true });
else
listGrid.appendPostData({ ParentFlag: false });
if ($("#ValueDate").val() == "" ||
$("#ValueDate").val() == undefined ||
$("#ValueDate").val() == null) {
main.message("请选择要查看报告的结束日期!");
return;
}
if ($("#ValueDate").val() < $("#ValueDateFrom").val()) {
main.message("起始日期不能大于结束日期!");
return;
}
listGrid.appendPostData({ ValueDateFrom: $("#ValueDateFrom").val() });
listGrid.appendPostData({ ValueDate: $("#ValueDate").val() });
listGrid.appendPostData({ StructureType: page.StructureType });
if (typeof (isSearchclick) != "undefined" && isSearchclick) {
//点击搜索时默认第一页
listGrid.jqGrid('setGridParam',
{
page: 1
});
}
listGrid.trigger('reloadGrid');
}
function onSortCol(index, icol, sortorder) {
g_sort.name = index;
g_sort.order = sortorder;
}
var i = 0;
var colModelGrid = [
{
name: 'position.EncryptId',
label: 'EncryptId',
index: 'position.EncryptId',
sortIndex: i++,
width: 70,
align: 'center',
hidden: true,
optionHide: true
}, {
name: 'TradeStatus',
label: '交易状态',
index: 'TradeStatus',
hidden: true,
optionHide: true
}, {
name: 'UnwindDate',
label: '平仓日期',
index: 'UnwindDate',
hidden: true,
optionHide: true
}, {
name: 'TradeNumber',
label: '交易编号',
index: 'TradeNumber',
sortIndex: i++,
width: 180,
align: 'center',
sortable: false
}, {
name: 'ConfrimNo',
label: '合约编号',
index: 'ConfrimNo',
sortIndex: i++,
width: 180,
align: 'center',
sortable: false
}, {
name: 'ClientName',
label: '交易对手',
index: 'ClientName',
sortIndex: i++,
width: 120,
align: 'center',
sortable: false
}, {
name: 'position.PosiStartDate',
label: '起始日',
index: 'position.PosiStartDate',
sortIndex: i++,
width: 100,
align: 'center',
sortable: false,
formatter:'date',
}, {
name: 'position.ValueDate',
label: '估值日',
index: 'position.ValueDate',
sortIndex: i++,
width: 100,
align: 'center',
sortable: false,
formatter: 'date',
}, {
name: 'position.UnderlyingCode',
label: '参考标的',
index: 'position.UnderlyingCode',
width: 120,
align: 'center',
sortable: false
},{
name: 'position.PositionTypeStr',
label: '标的多空',
index: 'position.PositionTypeStr',
width: 120,
align: 'center',
sortable: false
}, {
name: 'position.PosiNotionalValue',
label: '标的名义金额',
index: 'position.PosiNotionalValue',
width: 150,
align: 'center',
sortable: false,
formatter: StockEqvNotionalFormat,
}, {
name: 'PeriodAmount',
label: '期间付息',
index: 'PeriodAmount',
width: 100,
align: 'center',
sortable: false
}, {
name: 'position.PosiGrossPrice',
label: '期初标的交割全价',
index: 'position.PosiGrossPrice',
width: 150,
align: 'center',
sortable: false,
formatter: PriceFormat
}, {
name: 'position.UnderlyingPrice',
label: '期末标的交割全价',
index: 'position.UnderlyingPrice',
width: 150,
align: 'center',
formatter: PriceFormat,
sortable: false,
}, {
name: 'DayCount',
label: '实际期限',
index: 'DayCount',
width: 90,
align: 'center',
sortable: false,
}, {
index: 'RateType',
label: '利率类型',
width: 120,
align: 'center',
name:"RateType",
sortable: false,
}, {
label: '浮动利率基准',
width: 120,
align: 'center',
formatter: function (cellValue, options, rowObject) {
if (rowObject.FloatRateUnderlyingCode != null && rowObject.FloatRateUnderlyingCode != "") {
return rowObject.FloatRateUnderlyingCode;
}
return "-";
},
sortable: false,
}, {
name: 'InterestRate',
label: '利率/利差',
index: 'InterestRate',
width: 120,
align: 'center',
sortable: false,
formatter: RateFormat,
}, {
name: 'FloatRateAbs',
label: '浮动利率(绝对)',
index: 'FloatRateAbs',
width: 120,
align: 'center',
sortable: false,
formatter: RateFormat
}, {
name: 'InterestAmount',
label: '利率收益金额',
index: 'InterestAmount',
width: 120,
align: 'center',
formatter: StockEqvNotionalFormat,
sortable: false,
}, {
name: 'position.VTradingFee',
label: '交易费用',
index: 'position.VTradingFee',
width: 120,
align: 'center',
formatter: StockEqvNotionalFormat,
sortable: false,
}, {
name: 'position.PosiProfitSum',
label: '总收益金额',
index: 'position.PosiProfitSum',
width: 120,
align: 'center',
formatter: StockEqvNotionalFormat,
sortable: false,
}, {
name: 'NetSettmentAmount',
label: '净额结算金额',
index: 'NetSettmentAmount',
width: 120,
align: 'center',
formatter: StockEqvNotionalFormat,
sortable: false,
}
];
function formatter6(cellvalue, options, rowObject) {
return main.formatNumber(cellvalue, 6);
}
function formatter2(cellvalue, options, rowObject) {
return main.formatNumber(cellvalue);
}
function gridComplete() {
var jgrid = $(this);
var datas = jgrid.jqGrid('getDataIDs');
for (var i = 0; i < datas.length; i++) {
var rowdata = jgrid.jqGrid('getRowData', datas[i]);
var dataError = false;
var valueDate = new moment(rowdata["position.ValueDate"]);
var PosiStartDate = new moment(rowdata["position.PosiStartDate"]);
var UnwindDate = new moment(rowdata["UnwindDate"]);
if (valueDate < PosiStartDate) {
dataError = true
}
if (rowdata["TradeStatus"] == "已平仓" && UnwindDate <= valueDate) {
dataError = true
}
if (dataError) {
jgrid.jqGrid('setRowData', datas[i], '', "data-error"); // 设置背景颜色为淡红色
}
}
main.setcolumnChooser(jgrid, page.configcolumn);
$(".selftooltip").tooltip({ html: true, show: 50000, trigger: "hover" });
$(window).off('resize.jqGrid');
}
function reloadTradeMarketReport() {
//重新加载
SearchClick(true);
}
function PopDesc() {
main.open("配置报告", "/clientbalance/TradeMarketDescSet");
}
function SendReport() {
var param = {};
var clientName = $("#ClientId :selected").text();
param.ClientId = $("#ClientId").val();
param.ValueDate = $("#ValueDate").val();
if (param.ClientId === "" ||
param.ClientId == undefined ||
param.ClientId == null ||
param.ClientId === 'null') {
main.message("请选择要查看报告的客户名称!");
return;
}
if (param.ValueDate === "" ||
param.ValueDate == undefined ||
param.ValueDate == null ||
param.ValueDate === 'null') {
main.message("请选择要查看报告的结束日期!");
return;
}
if ($("#ParentFlag").prop("checked"))
param.ParentFlag = true;
else
param.ParentFlag = false;
if ($("#ValueDate").val() > page.valueDate) {
main.message("结束日期不能大于当前系统日期!");
return;
}
if ($("#ValueDate").val() < $("#ValueDateFrom").val()) {
main.message("起始日期不能大于结束日期!");
return;
}
main.open("向{0}发送报告".template(clientName), "/clientbalance/TradeMarketClientSend?clientid=" + param.ClientId + "&ParentFlag=" + param.ParentFlag);
}
function DownLoadReport() {
var param = {};
var clientName = $("#ClientId :selected").text();
param.ClientId = $("#ClientId").val();
param.ValueDate = $("#ValueDate").val();
if (!param.ClientId || param.ClientId === 'null') {
main.message("请选择要查看报告的客户名称!");
return;
}
if (!param.ValueDate || param.ValueDate === 'null') {
main.message("请选择要查看报告的结束日期!");
return;
}
if ($("#ValueDate").val() > page.calcDate) {
main.message("结束日期不能大于当前系统日期!");
return;
}
if ($("#ValueDate").val() < $("#ValueDateFrom").val()) {
main.message("起始日期不能大于结束日期!");
return;
}
main.post("/clientbalance/ViewTradeMarketFile", screenData()).done(function (res) {
window.open(res.obj);
});
}
function screenData() {
var data = { From: $("#ValueDateFrom").val(), To: $("#ValueDate").val() };
data.ClientId = $("#ClientId").val();
if ($("#ParentFlag").prop("checked"))
data.ParentFlag = true;
else
data.ParentFlag = false;
return data;
}
function showChiCang() {
main.showcolumnChooser(jQuery('#listGrid'), page.configcolumn);
}
function PriceFormat(cellValue, options, rowObject) {
return otcformat.trading.umprice(cellValue);
}
function StockEqvNotionalFormat(cellValue, options, rowObject) {
return otcformat.trading.StockEqvNotional(cellValue);
}
function RateFormat(cellValue, options, rowObject) {
if (cellValue) {
var num = new Number(cellValue) * 100;
return num.toFixed(4) + "%";
} else {
return "0.0000%";
}
}
function locationChange(tab) {
if ($("#ValueDate").val() > page.valueDate) {
main.message("结束日期不能大于当前系统日期!");
return;
}
if ($("#ValueDate").val() < $("#ValueDateFrom").val()) {
main.message("起始日期不能大于结束日期!");
return;
}
if ($("#ParentFlag").prop("checked"))
ParentFlag = true;
else
ParentFlag = false;
window.location.href = tab + "?clientId=" + $("#ClientId").val() + "&startTime=" + $("#ValueDateFrom").val() + "&endTime=" + $("#ValueDate").val() + "&ParentFlag=" + ParentFlag;
return;
}
@@ -1,90 +0,0 @@
//function getColModelGrid() {
// var i = 0;
// var colModelGrid = [
// {
// name: 'TDate',
// label: '日期',
// index: 'TDate',
// sortIndex: i++,
// width: 70,
// align: 'center',
// hidden: true
// }, {
// name: 'InterestBearingDays',
// label: '计息天数',
// index: 'InterestBearingDays',
// sortIndex: i++,
// width: 150,
// align: 'center'
// }, {
// name: 'AnnualRate',
// label: '年化成本',
// index: 'AnnualRate',
// sortIndex: i++,
// width: 150,
// align: 'center'
// }, {
// name: 'PositionVol',
// label: '持仓数量',
// index: 'PositionVol',
// sortIndex: i++,
// width: 70,
// align: 'center'
// }, {
// name: 'SettlePrice',
// label: '结算价',
// index: 'SettlePrice',
// sortIndex: i++,
// width: 100,
// align: 'center'
// }, {
// name: 'MarginRate',
// label: '预付金比率',
// index: 'MarginRate ',
// width: 100,
// align: 'right',
// sortable: false,
// sortIndex: i++
// }, {
// name: 'MarginCost',
// label: '预付金占用成本',
// index: 'MarginCost',
// sortIndex: i++,
// width: 70,
// align: 'left'
// }
// ];
// return colModelGrid;
//}
//function showTotalCount() {
//}
//var g_grid = {};
//$(document).ready(function () {
// var enid = $("input[name=enid]").val();
// $("#margincost").jqGrid({
// url: '/forwardtrade/SingleMarginCost?enid=' + enid,
// mtype: 'Get',
// datatype: 'json',
// multiselect: true,
// height: 'auto',
// width: 'auto',
// autowidth: false,
// shrinkToFit: false,
// viewrecords: true,
// jsonReader: { repeatitems: false },
// caption: '预付金占用成本累计:99.9',
// colModel: getColModelGrid(),
// pager: jQuery('#pagerGrid'),
// pagerpos: 'left',
// ondblClickRow: rowdblclick,
// rowNum: 20,
// rowList: [20, 30, 50, 200, 10000],
// footerrow: false,
// loadComplete: gridComplete,
// grouping: true
// });
//});
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long