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

170 lines
6.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@model StockCommissionConfig
@{
ViewBag.Title = "股票交易成本设置";
Layout = "~/Views/Shared/_InfoLayout.cshtml";
bool isClientEdit = CurUser.客户管理.客户修改;
}
@section JS{
<script src="~/Statics/libs/upload/js/jquery.iframe-transport.js?v=@(HtmlUtil.JsVersion)"></script>
<script src="~/Statics/libs/upload/js/jquery.fileupload.js?v=@(HtmlUtil.JsVersion)"></script>
<script type="text/javascript">
function saveStockCommissionSetUp() {
//当tab点击456时,save事件调用check方法,会报js内部错位,此时也没什么可验证的,就舍去了验证步骤
var data = $("#stockCommissionSetUpEditForm").serialize();
var ajaxopt = {
type: "Post",
url: "/exchange_account/stockCommissionSetUpEditJson",
data: data,
dataType: "json",
success: function (res) {
if (res.success) {
window.parent.showmiddlemessage("成功更新本条数据");
window.location.href = "/exchange_account/stockCommissionSetUp?AccountCode=" + res.obj.ExchangeAccountCode;
}
else {
alert(res.msg);
}
},
error: function (msg) {
alert("error:" + msg);
}
}
var nameVal = $("#Name").val();
var nameHidden = $("#NameHidden").val();
var creditRatingId = $("#CreditRatingId").val();
var creditRatingIdHidden = $("#CreditRatingIdHidden").val();
main.ajax(ajaxopt);
}
$(function () {
$('.form-group').removeClass('col-md-6');
changeStampDutyType();
changeCommissionType();
changeTransferFeeType();
changeOtherExpensesType();
});
function changeStampDutyType() {
var StampDutyType = $("#StampDutyType").val();
if (StampDutyType == undefined || StampDutyType == "0") {
$("#StampDuty").prop("readonly", true);
$("#MinStampDuty").prop("readonly", true);
} else {
$("#StampDuty").prop("readonly", false);
$("#MinStampDuty").prop("readonly", false);
}
}
function changeCommissionType() {
var StampDutyType = $("#CommissionType").val();
if (StampDutyType == undefined || StampDutyType == "0") {
$("#Commission").prop("readonly", true);
$("#MinCommission").prop("readonly", true);
} else {
$("#Commission").prop("readonly", false);
$("#MinCommission").prop("readonly", false);
}
}
function changeTransferFeeType() {
var StampDutyType = $("#TransferFeeType").val();
if (StampDutyType == undefined || StampDutyType == "0") {
$("#TransferFee").prop("readonly", true);
$("#MinTransferFee").prop("readonly", true);
} else {
$("#TransferFee").prop("readonly", false);
$("#MinTransferFee").prop("readonly", false);
}
}
function changeOtherExpensesType() {
var StampDutyType = $("#OtherExpensesType").val();
if (StampDutyType == undefined || StampDutyType == "0") {
$("#OtherExpenses").prop("readonly", true);
$("#MinOtherExpenses").prop("readonly", true);
$("#MaxOtherExpenses").prop("readonly", true);
} else {
$("#OtherExpenses").prop("readonly", false);
$("#MinOtherExpenses").prop("readonly", false);
$("#MaxOtherExpenses").prop("readonly", false);
}
}
</script>
}
@section CSS{
<style>
.formlabel { text-align:left;display:block;}
.text-box { width:100%;}
</style>
}
@using (Html.BeginForm("stockCommissionSetUpEdit", "client", FormMethod.Post, new { id = "stockCommissionSetUpEditForm" }))
{
<div class="container yc-panel">
@Html.HiddenFor(model => model.id)
@Html.HiddenFor(model => model.EncryptId)
@Html.HiddenFor(model => model.ExchangeAccountCode)
<div class="row">
<div class="col-4">
@Html.MyDropdownFor1(m => m.StampDutyType, GlobalData.GetSelectItems(StockCommissionConfig.CommissionTypeList), new { @onchange = "changeStampDutyType()" }, "", true, true)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.StampDuty)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.MinStampDuty)
</div>
</div>
<div class="row">
<div class="col-4">
@Html.MyDropdownFor1(m => m.CommissionType, GlobalData.GetSelectItems(StockCommissionConfig.CommissionTypeList), new { @onchange = "changeCommissionType()" }, "", true, true)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.Commission)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.MinCommission)
</div>
</div>
<div class="row">
<div class="col-4">
@Html.MyDropdownFor1(m => m.TransferFeeType, GlobalData.GetSelectItems(StockCommissionConfig.CommissionTypeList), new { @onchange = "changeTransferFeeType()" }, "", true, true)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.TransferFee)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.MinTransferFee)
</div>
<div class="col-4">
</div>
</div>
<div class="row">
<div class="col-4">
@Html.MyDropdownFor1(m => m.OtherExpensesType, GlobalData.GetSelectItems(StockCommissionConfig.CommissionTypeList), new { @onchange = "changeOtherExpensesType()" }, "", true, true)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.OtherExpenses)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.MinOtherExpenses)
</div>
<div class="col-4">
@Html.MyDecimalFor(m => m.MaxOtherExpenses)
</div>
<div class="col-4">
<label class="d-inline-block">是否启用</label>
@Html.DropDownListFor(n => n.Enabled, GlobalData.QiYongTypes())
</div>
</div>
</div>
}
<div class="offset-4 mt-2">
@MyControls.Btn("保存", "saveStockCommissionSetUp()")
@MyControls.Btn("关闭", "layer.closeMe();")
</div>