feat(swap): 实现互换交易价格精度控制功能 init

- 添加 swapPricePrecisionHelper.js 工具类处理价格精度格式化
- 新增 swappriceprecision.js 配置文件定义各类金融产品的精度规则
- 在 EodPositionRisks.cshtml 和 SwapIncome.cshtml 中引入新的价格格式化脚本
- 替换原有的价格格式化函数为基于产品类型的动态精度控制
- 移除旧的价格验证和标准化逻辑,改用新的精度控制机制
- 添加 vue-swap-price-input 组件用于精确的价格输入控制
- 更新 Controller 中的价格处理逻辑以支持新精度格式化方式
This commit is contained in:
张名锐
2026-07-29 09:44:04 +08:00
parent ac00548009
commit fd2a054764
18 changed files with 548 additions and 136 deletions
+11
View File
@@ -37,6 +37,17 @@ namespace YLErp.Web.Controllers
return Content(js, "text/javascript");
}
[AllowAnonymous]
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
public ActionResult SwapPricePrecision()
{
var filePath = Server.MapPath("~/App_Data/Config/swappriceprecision.js");
var js = System.IO.File.Exists(filePath)
? System.IO.File.ReadAllText(filePath)
: "var main = main || {}; main.swapPricePrecision = {};";
return Content(js, "text/javascript");
}
//今年及前后两年的日历数据(缓存120s)
[ResponseCache(Duration = 120, Location = ResponseCacheLocation.Any)]
public ActionResult Calendar()