53 lines
1.8 KiB
JavaScript
53 lines
1.8 KiB
JavaScript
var vue = new Vue({
|
|
el: "#listdiv",
|
|
data: {
|
|
Underlying: Underlying,
|
|
Underlying_Params: Underlying_Params,
|
|
Main_Param: { VolatilityProperty: "", NoRiskRate: "" }
|
|
},
|
|
mounted: function () {
|
|
this.Main_Param.VolatilityProperty = this.Underlying_Params[0].VolatilityProperty || "交易";
|
|
this.Main_Param.NoRiskRate = (this.Underlying_Params[0].NoRiskRate * 100).toFixed(3);
|
|
},
|
|
computed: {
|
|
attachesFilter: function (d) {
|
|
var data = $.map(value, function (a, t) { if (a.masterId === oid) return true; });
|
|
return data;
|
|
}
|
|
},
|
|
filters: {
|
|
NullToZero: function (data) {
|
|
if (!data) return 0;
|
|
return data;
|
|
},
|
|
TypeFilter: function (type) {
|
|
switch (type) {
|
|
case "CallAsk":
|
|
return "客户买价 =";
|
|
case "CallBid":
|
|
return "客户卖价 =";
|
|
case "PutAsk":
|
|
return "客户买价 =";
|
|
case "PutBid":
|
|
return "客户卖价 =";
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
submitParameters: function (item, count) {
|
|
var thisObj = this;
|
|
//初始化提交数据
|
|
$.each(thisObj.Underlying_Params, function (i, d) {
|
|
d.VolatilityProperty = thisObj.Main_Param.VolatilityProperty;
|
|
d.NoRiskRate = thisObj.Main_Param.NoRiskRate / 100;
|
|
});
|
|
main.post("/underlying_manager/SubmitParameters", { datas: thisObj.Underlying_Params }).done(function (r) {
|
|
parent.main.message(r.msg);
|
|
parent.layer.close();
|
|
});
|
|
},
|
|
closePage: function (cid) {
|
|
parent.layer.closeAll();
|
|
}
|
|
}
|
|
});
|