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

114 lines
4.5 KiB
Plaintext

@model List<YLErp.Modules.TradeModule.Structure_dz.Structure>
@{
ViewBag.Title = "客户信息";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
}
@section CSS{
}
@section JS{
<script type="text/javascript">
const page = @Json.Serialize(Model);
var calcId = @ViewBag.calcId;
var onlyshow = @(ViewBag.onlyshow == true? "true": "false");
const inputFormatDouble2 = Object.freeze({ precision: 2, append: '' });
const vue = new Vue({
el: '#model',
data: {
list: _.cloneDeep(page),
Onlyshow: onlyshow,
},
watch: {
},
created: function () {
},
mounted() {
},
methods: {
savelist() {
var ret = JSON.stringify(this.list);
window.parent.getStructureSetting(ret, calcId);
try { window.parent.layer.closeAll(); } catch (e) { }
},
closeParentWindow() {
try { window.parent.layer.closeAll(); } catch (e) { }
}
},
computed: {
},
components: {
'vue-number-input': FastVue.vueNumberInput(),
},
destroyed() {
}
});
</script>
}
<html>
<body>
<div class="tab-content" id="model">
<table class="table">
<thead>
<tr>
<td></td>
<td>期权类型</td>
<td>执行价格</td>
<td>障碍边界</td>
<td>期权乘数</td>
<td>Ramp</td>
<td>IsAccAlSrike</td>
</tr>
</thead>
<tbody>
<template v-if="!Onlyshow">
<tr v-for="(item, index) in list">
<td>{{++index}}</td>
<td>
<select v-model="item.OptionType">
<option value="None">None</option>
<option value="Call">Call</option>
<option value="Put">Put</option>
<option value="DigitalCall">DigitalCall</option>
<option value="DigitalPut">DigitalPut</option>
<option value="UOC">UOC</option>
<option value="DOP">DOP</option>
</select>
</td>
<td><vue-number-input v-model="item.Strike" v-bind:format="inputFormatDouble2" style="width: 72px !important;" /></td>
<td><vue-number-input v-model="item.BarrierPrice" v-bind:format="inputFormatDouble2" style="width: 72px !important;" /></td>
@*<td><vue-number-input v-model="item.Multiplier" style="width: 72px !important;" /></td>*@
<td><input type="number" max="999999" min="-999999" v-model="item.Multiplier" class="text-box" v-bind:format="inputFormatDouble2" style="width: 72px !important;" /></td>
<td><input type="number" max="999999" min="-999999" v-model="item.RAMP" class="text-box" style="width: 72px !important;" /></td>
<td>
<select v-model="item.IsAccAlSrike">
<option value="false">False</option>
<option value="true">True</option>
</select>
</td>
</tr>
</template>
<template v-else>
<tr v-for="(item, index) in list">
<td>{{++index}}</td>
<td>{{item.OptionType}} </td>
<td>{{item.Strike}}</td>
<td>{{item.BarrierPrice}}</td>
<td>{{item.Multiplier}}</td>
<td>{{item.RAMP}}</td>
<td>{{item.IsAccAlSrike}}</td>
</tr>
</template>
</tbody>
</table>
<div v-if="!Onlyshow" class="text-center" style="margin-top:50px;">
<button class="btn btn-primary" type="button" v-on:click="savelist">保存</button>
<button class="btn btn-primary" type="button" v-on:click="closeParentWindow">关闭</button>
</div>
</div>
</body>
</html>