Files
zszq-trs/YLErpWeb/Views/ScenarioAnalysis/ScenarioEdit.cshtml
T
2024-05-09 14:06:26 +08:00

110 lines
4.8 KiB
Plaintext

@model ScenarioConfigV2
@{
ViewBag.Title = "情景分析配置 | 编辑";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
var pageObj = new
{
Model = Model,
varieties = JsDataModel.GetVarieties(CurUser,true),
xyTypes = YLErp.Modules.ScenarioModule.ScenarioHelper.XyTypes
};
}
@section CSS{
<style>
.text-box-lg { width: 230px !important; }
</style>
}
@section JS{
<script src="~/Scripts/app/tradeHelper.js?v=@HtmlUtil.JsVersion"></script>
<script type="text/javascript">
const pageObj = @Json.Serialize(pageObj);
</script>
<script src="~/Scripts/app/scenario/scenarioEditV2.js"></script>
}
<form id="formEdit" method="post" onsubmit="return false;">
<div class="form-layout">
<input type="hidden" value="@Model.id" name="id" id="id" />
<input type="hidden" value="@Model.EncryptId" name="EncryptId" id="EncryptId" />
<input type="hidden" value="@Model.UserId" name="UserId" id="UserId" />
<div class="form-group">
<label class="formlabel">所属交易员</label>
<input type="text" v-model="Model.UserName" name="UserName" readonly="readonly" class="text-box">
</div>
<div class="form-group">
<label class="formlabel">情景名称</label>
<input type="text" v-model="Model.ConfigName" name="ConfigName" class="text-box"><span style="color: red;">*</span>
</div>
<div class="form-group row no-gutters">
<div class="col-auto">
<label class="formlabel">横坐标参数</label>
<select v-model="Model.xType" name="xType">
@foreach (var item in pageObj.xyTypes)
{
<option value="@item">@item</option>
}
</select>
</div>
<div class="col">
<label class="ml-2 mr-1">横坐标变动率</label>
<input type="text" v-model="Model.xRates" name="xRates" class="text-box text-box-lg" v-bind:placeholder="xRatePlaceHolder">
</div>
</div>
<div class="form-group row no-gutters">
<div class="col-auto">
<label class="formlabel">纵坐标参数</label>
<select v-model="Model.yType" name="yType">
@foreach (var item in pageObj.xyTypes)
{
<option value="@item">@item</option>
}
</select>
</div>
<div class="col">
<label class="ml-2 mr-1">纵坐标变动率</label>
<input type="text" v-model="Model.yRates" name="yRates" class="text-box text-box-lg" v-bind:placeholder="yRatePlaceHolder">
</div>
</div>
@*<div class="mt-4 border">
<div class="pl-3 pr-3 pt-3">
<span>标的价格特殊配置</span>
<input class="btn btn-warning" type="button" value="新增标的品种" v-on:click="addVaritySpecial">
<input class="btn btn-warning" type="button" value="新增标的代码" v-on:click="addUnderlyingSpecial">
</div>
<hr class="mt-2 mb-1" />
<div class="p-3">
<template v-for="(varity,index) in Model.VarityList">
<div class="form-group VaritySpecial">
<label class="formlabel">标的品种变动率</label>
<vue-variety v-model="varity.id" :key="updateKey.variety"></vue-variety>
<vue-number-input class="text-box ml-1" name="Rate" v-model="varity.Rate" v-bind:format="RateNumberFormat" placeholder="偏移量"></vue-number-input>
<a class="ml-1" href="javascript:void(0)" v-on:click="removeVaritySpecial(index)"><i class="fa fa-remove"></i></a>
</div>
</template>
<template v-for="(underlying,index) in Model.UnderlyingList">
<div class="form-group UnderlyingSpecial">
<label class="formlabel">标的代码变动率</label>
<vue-underlying v-model="underlying.id" :key="updateKey.underlying"></vue-underlying>
<vue-number-input class="text-box ml-1" name="Rate" v-model="underlying.Rate" v-bind:format="RateNumberFormat" placeholder="偏移量"></vue-number-input>
<a class="ml-1" href="javascript:void(0)" v-on:click="removeUnderlyingSpecial"><i class="fa fa-remove"></i></a>
</div>
</template>
</div>
</div>*@
</div>
<div class="form-buttons">
<button class="btn btn-primary" type="button" v-on:click="saveData">保存</button>
<button class="btn btn-primary" type="button" onclick="layer.closeMe();">关闭</button>
</div>
</form>