207 lines
9.5 KiB
Plaintext
207 lines
9.5 KiB
Plaintext
@model ClientCashInCashOut
|
|
@{
|
|
ViewBag.Title = "出入金信息 | 编辑";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
var clientId = Model.ClientId ?? 0;
|
|
var clients = JsDataModel.GetClients();
|
|
var pageObj = new
|
|
{
|
|
clients,
|
|
clientId,
|
|
client = clientId > 0 ? clients.FirstOrDefault(n => n.id == clientId) : null,
|
|
OpenBankId = Model.OpenBankId ?? 0,
|
|
OpenBankCard = Model.OpenBankCard,
|
|
isCompanyCash = ViewBag.IsCompanyCash == true,
|
|
changeBeforeConfirm = Model.State == "未确认" || Model.State == "" || (Model.Direction.Contains("其他") && CurUser.结算管理_已确认资金记录维护),
|
|
IsBankOnlyDropDown = YLErp.PS.Config.ClientElement.IsBankOnlyDropDown,
|
|
isChangeAfterConfirm = CurUser.结算管理_已确认资金记录维护,
|
|
currencyCode = Model.CurrencyCode
|
|
};
|
|
}
|
|
@section CSS{
|
|
<link href="~/Statics/libs/datetime/flatpickr/flatpickr.min.css" rel="stylesheet" />
|
|
<style>
|
|
#Comments, #Explain { display: block; min-width: 720px; margin-left: 50px; }
|
|
</style>
|
|
}
|
|
@section JS{
|
|
<script>
|
|
const page = @Json.Serialize(pageObj);
|
|
</script>
|
|
<script src="~/Statics/libs/datetime/flatpickr/flatpickr.min.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
<script src="~/Scripts/app/client/entryexitEdit.js?v=@(HtmlUtil.JsVersion)"></script>
|
|
}
|
|
|
|
<form class="yc-panel" onsubmit="return false;" id="entryexitEditForm">
|
|
|
|
<input type="hidden" value="@Model.id" name="id" id="id" />
|
|
<input type="hidden" value="@Model.EncryptId" name="EncryptId" />
|
|
<input type="hidden" value="@Model.CashFlag" name="CashFlag" />
|
|
<input type="hidden" value="@Model.ClientNumber" name="ClientNumber" />
|
|
<input type="hidden" value="@Model.Money" name="Money" id="Money" />
|
|
<input type="hidden" value="@Model.Number" name="Number" />
|
|
|
|
<div class="row">
|
|
@if (pageObj.changeBeforeConfirm)
|
|
{
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">客户名称</label>
|
|
<input type="text" name="ClientId" id="ClientId" value="@Model.ClientId" />
|
|
<input type="hidden" value="@Model.ClientName" name="ClientName" id="ClientName" />
|
|
</div>
|
|
if (Model.Direction != ClientCashInCashOut.应收 && !pageObj.isCompanyCash)
|
|
{
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">方向</label>
|
|
<select name="Direction" id="Direction" onchange="setDirection(0)">
|
|
@if (Model.TradeId > 0)
|
|
{
|
|
foreach (var item in EntryExitBLL.EntryDirection_Menu.Where(x => x.Contains("其他")))
|
|
{
|
|
<option value="@(item)" @(item == Model.Direction ? "selected" : "")>@(item)</option>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
foreach (var item in EntryExitBLL.EntryDirection_Menu)
|
|
{
|
|
<option value="@(item)" @(item == Model.Direction ? "selected" : "")>@(item)</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
}
|
|
else if (pageObj.isCompanyCash)
|
|
{
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">方向</label>
|
|
<select name="Direction" id="Direction" onchange="setDirection(0)">
|
|
<option value="应收">应收</option>
|
|
<option value="应付">应付</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">操作来源</label>
|
|
<select name="Action" id="Action">
|
|
@foreach (var item in EntryExitBLL.EntryDirection_Menu)
|
|
{
|
|
<option value="人工操作_预付金">预付金</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<div class="form-group col-6">
|
|
<label class="formlabel" for="ClientId">客户名称</label>
|
|
<input type="text" readonly name="ClientName" value="@Model.ClientName" />
|
|
<input type="hidden" value="@Model.ClientId" name="ClientId" id="ClientId" />
|
|
</div>
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">方向</label>
|
|
<input type="text" readonly name="Direction" value="@Model.Direction" />
|
|
</div>
|
|
}
|
|
<div class="form-group col-6" id="cash_type_container">
|
|
<label class="formlabel">账户类型</label>
|
|
<select name="cash_type" id="cash_type">
|
|
<option value="初保账户" @(Model.cash_type == "初保账户" ? "selected" : "")>初保账户</option>
|
|
<option value="追保账户" @(Model.cash_type == "追保账户" ? "selected" : "")>追保账户</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group col-6" id="transfer_out_container">
|
|
<label class="formlabel">转出科目</label>
|
|
<select name="TransferOutAccount" id="TransferOutAccount" onchange="setTransferMoney()" @(Model.id > 0 ? "disabled" : "")>
|
|
@foreach (var item in EntryExitBLL.TransferAccount)
|
|
{
|
|
<option value="@(item)" @(item == Model.TransferOutAccount ? "selected" : "")>@(item)</option>
|
|
}
|
|
</select>
|
|
<label id="transfer_out_account_money">余额:</label>
|
|
</div>
|
|
<div class="form-group col-6" id="transfer_in_container">
|
|
<label class="formlabel">转入科目</label>
|
|
<select name="TransferInAccount" id="TransferInAccount" onchange="setTransferMoney()" @(Model.id > 0 ? "disabled" : "")>
|
|
@foreach (var item in EntryExitBLL.TransferAccount)
|
|
{
|
|
<option value="@(item)" @(item == Model.TransferInAccount ? "selected" : "")>@(item)</option>
|
|
}
|
|
</select>
|
|
<label id="transfer_in_account_money">余额:</label>
|
|
</div>
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">金额</label>
|
|
<input id="MoneyStr" class="text-box" type="text" value="@(Model.MoneyStr)" name="MoneyStr" oninput="moneyInputMgr.onInput()" onfocus="moneyInputMgr.onFocus()" onblur="moneyInputMgr.onChange()" autocomplete="off">
|
|
<span></span>
|
|
<a href="javascript:void(0)" onclick="transferAll()" id="transferAll">全部转出</a>
|
|
</div>
|
|
|
|
@if (Model.TradeId == null || Model.TradeId == 0)
|
|
{
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">币种</label>
|
|
<select name="CurrencyCode" id="CurrencyCode" onchange="setDirection(0)">
|
|
</select>
|
|
</div>
|
|
}
|
|
|
|
<div class='form-group col-6'>
|
|
<label class='formlabel col-auto pl-0'>发生时间</label>
|
|
<input class='form_datetime text-box' size='16' id='HappenDate' type='text' value='@(Model.HappenDate?.ToString("yyyy-MM-dd HH:mm"))' name='HappenDate' />
|
|
</div>
|
|
|
|
<div class="form-group col-6">
|
|
<label class="formlabel">银行账号</label>
|
|
@if (pageObj.changeBeforeConfirm)
|
|
{
|
|
<span class="card-input-wrap"></span>
|
|
if (!pageObj.IsBankOnlyDropDown)
|
|
{
|
|
<a class="changeInputBtn" href="javascript:;" onclick="cardInputMgr.changeInputType()">切换输入</a>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<input type="text" class="text-box" name="OpenBankCard" id="OpenBankCard" value="@(Model.OpenBankCard)" readonly />
|
|
<input type="hidden" value="@Model.OpenBankId" name="OpenBankId" id="OpenBankId" />
|
|
}
|
|
<span id="OpenBankUser" style="color:red">@Model.Uses</span>
|
|
<input type="hidden" value="@Model.OpenBank" name="OpenBank" id="OpenBank" />
|
|
</div>
|
|
|
|
<div class="form-group col-12">
|
|
<label class="formlabel">备注</label>
|
|
<div class="p-2">
|
|
<textarea id="Comments" name="Comments" rows="3">@(Model.Comments)</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
@if (Model.id > 0)
|
|
{
|
|
<div class="form-group col-12">
|
|
<label class="formlabel">说明</label>
|
|
<div class="p-2">
|
|
<textarea id="Explain" name="Explain" rows="3">@(Model.Explain)</textarea>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
</div>
|
|
|
|
<div class="m-4" style="padding-left:100px;">
|
|
<button class="btn btn-primary" type="button" onclick="saveentryexit();return false;">保存</button>
|
|
<button class="btn btn-primary" type="button" onclick="layer.closeMe();return false;">关闭</button>
|
|
</div>
|
|
</form>
|
|
|
|
<script type="text/html" id="cardInputTpl">
|
|
<div class="select">
|
|
<select name="OpenBankId" id="OpenBankId" onchange="cardInputMgr.onBankIdChange()"></select>
|
|
<input type="hidden" value="@Model.OpenBankCard" name="OpenBankCard" id="OpenBankCard" />
|
|
</div>
|
|
<div class="input">
|
|
<input type="text" class="text-box" name="OpenBankCard" id="OpenBankCard" value="@(Model.OpenBankCard)" />
|
|
<input type="hidden" value="" name="OpenBankId" id="OpenBankId" />
|
|
</div>
|
|
</script> |