+
@if (pageObj.changeBeforeConfirm)
{
diff --git a/YLErpWeb/Views/entryexit/entryexitList.cshtml b/YLErpWeb/Views/entryexit/entryexitList.cshtml
index d34f3ac2..8948a6d9 100644
--- a/YLErpWeb/Views/entryexit/entryexitList.cshtml
+++ b/YLErpWeb/Views/entryexit/entryexitList.cshtml
@@ -52,7 +52,7 @@
TradeAction: isCompanyCash ? "@ClientCashInCashOut.人工操作_预付金" : ""
};
if (!isCompanyCash) {
- PostData.DirectionTypes = "出金,入金,权利金支出,权利金收入,平仓/行权支出,平仓/行权收入,票息支出,票息收入,其他支出,其他收入,互换收入,互换支出";
+ // PostData.DirectionTypes = "出金,入金,权利金支出,权利金收入,平仓/行权支出,平仓/行权收入,票息支出,票息收入,其他支出,其他收入,互换收入,互换支出";
} else {
PostData.InOut = "应收,应付";
}
@@ -394,7 +394,7 @@
function customButton(cellValue, options, rowObject) {
var imageHtml = "";
- if ((rowObject.Direction == "出金" || rowObject.Direction == "入金" || rowObject.Direction == "其他收入" || rowObject.Direction == "其他支出") && pageData.canDelete && rowObject.TradeNumber == "" && rowObject.ApprovalProcess < 1) {
+ if ((rowObject.Direction == "出金" || rowObject.Direction == "入金" || rowObject.Direction == "其他收入" || rowObject.Direction == "其他支出"|| rowObject.Direction == "划转") && pageData.canDelete && rowObject.TradeNumber == "" && rowObject.ApprovalProcess < 1) {
imageHtml = imageHtml + "";
@@ -495,7 +495,7 @@
if (isCompanyCash) {
addurl += "?isCompanyCash=1";
}
- main.open("新增资金记录", addurl, { area: ['1000px', '75%'] });
+ main.open("新增资金记录", addurl, { area: ['1000px', '95%'] });
}
function Entryexit_remove() {
@@ -505,7 +505,7 @@
function startentryexitView(id) {
var srcurl = "/entryexit/entryexitView/?enid=" + id;
- main.open("查看资金信息", srcurl, { area: ['1000px', '75%'] });
+ main.open("查看资金信息", srcurl, { area: ['1000px', '95%'] });
}
function reloadentryexit() {
diff --git a/YLErpWeb/Views/entryexit/entryexitView.cshtml b/YLErpWeb/Views/entryexit/entryexitView.cshtml
index 63e042ee..59492f60 100644
--- a/YLErpWeb/Views/entryexit/entryexitView.cshtml
+++ b/YLErpWeb/Views/entryexit/entryexitView.cshtml
@@ -67,6 +67,8 @@
@Html.MyDisplayFor(m => m.ClientName)
@Html.MyDisplayFor(m => m.DirectionType)
@Html.MyDisplayFor(m => m.cash_type)
+ @Html.MyDisplayFor(m => m.TransferOutAccount)
+ @Html.MyDisplayFor(m => m.TransferInAccount)
@Html.MyDisplayFor(m => m.Money, (((Model.Direction == "出金" ? (-1) : 1) * Model.Money) ?? 0).ToString("N"))
@Html.MyDisplayFor(m => m.CurrencyCode)
@Html.MyDisplayFor(m => m.HappenDate, Utilities.ShowValidDatetime(Model.HappenDate, "yyyy-MM-dd HH:mm:ss"))
diff --git a/YLErpWeb/wwwroot/Scripts/app/client/entryexitEdit.js b/YLErpWeb/wwwroot/Scripts/app/client/entryexitEdit.js
index 5dd2036d..159c707e 100644
--- a/YLErpWeb/wwwroot/Scripts/app/client/entryexitEdit.js
+++ b/YLErpWeb/wwwroot/Scripts/app/client/entryexitEdit.js
@@ -1,4 +1,8 @@
-const cardInputMgr = (new function () {
+var winloss = 0; // 已实现盈亏
+var netFund = 0; // 初保账户
+var vmFund = 0; // 追保账户
+var transferOutMoney = 0; // 转出金额
+const cardInputMgr = (new function () {
var _inited = 0, _inputFlag = 0;
@@ -180,7 +184,18 @@ function checkSubmitData() {
else {
$("#Money").val($("#Money").val().replace(',', ''));
}
-
+ let direction = $("#Direction").val();
+ if (direction==="划转") {
+ var transfer_out_account = $("#TransferOutAccount").val();
+ var transfer_in_account = $("#TransferInAccount").val();
+ if (transfer_out_account === transfer_in_account) {
+ return main.message("转出科目与转入科目不能相同!");
+ }
+ var money = parseFloat($("#Money").val());
+ if (money <=0) {
+ return main.message("转出金额必须大于0!");
+ }
+ }
return cardInputMgr.checkSubmit();
}
@@ -205,16 +220,30 @@ function setDirection(isInit) {
!isInit && cardInputMgr.changeInputType(true);
let direction = $("#Direction").val();
$(".changeInputBtn").toggleClass("hide", ["出金", "应付"].includes(direction));
- if (direction === "出金") {
- $("#cash_type_container").hide(); // 隐藏资金类型
- } else {
+ if (direction === "入金") {
$("#cash_type_container").show(); // 显示资金类型
+ } else {
+ $("#cash_type_container").hide(); // 隐藏资金类型
+ }
+ if (direction === "划转") {
+ $("#transfer_out_container").show();
+ $("#transfer_in_container").show();
+ $("#transferAll").show();
+ } else {
+ $("#transfer_out_container").hide();
+ $("#transfer_in_container").hide();
+ $("#transferAll").hide();
}
cardInputMgr.toggle(["入金", "出金"].includes(direction));
cardInputMgr.updateOptions();
}
+// 全部转出
+function transferAll() {
+ $("#MoneyStr").val(transferOutMoney);
+ moneyInputMgr.onInput();
+}
function setClientCash() {
var clientId = $("#ClientId").val();
if (!clientId) {
@@ -225,9 +254,41 @@ function setClientCash() {
$("#ClientCashCNY").val(res.CNY);
$("#ClientCashUSD").val(res.USD);
}
- })
+ });
+ main.post("/trade_span/GetClientLatestBalance", { clientId: clientId }).done(function (data) {
+ winloss = data.WinLoss;
+ netFund = data.NetFund;
+ vmFund = data.VmFundSum;
+ setTransferMoney();
+ });
+}
+function setTransferMoney() {
+ var clientId = $("#ClientId").val();
+ if (!clientId) {
+ return;
+ }
+ var transfer_out_account = $("#TransferOutAccount").val();
+ var transfer_in_account = $("#TransferInAccount").val();
+ if (transfer_out_account === "初保账户") {
+ transferOutMoney = netFund;
+ $("#transfer_out_account_money").text("余额:" + netFund);
+ }
+ else if (transfer_out_account === "追保账户") {
+ transferOutMoney = vmFund;
+ $("#transfer_out_account_money").text("余额:" + vmFund);
+ } else {
+ transferOutMoney = winloss;
+ $("#transfer_out_account_money").text("余额:" + winloss);
+ }
+ if (transfer_in_account === "初保账户") {
+ $("#transfer_in_account_money").text("余额:" + netFund);
+ }
+ else if (transfer_in_account === "追保账户") {
+ $("#transfer_in_account_money").text("余额:" + vmFund);
+ } else {
+ $("#transfer_in_account_money").text("余额:" + winloss);
+ }
}
-
$(function () {
cardInputMgr.init();