Merge branch 'feature/zs_v1.3_0822' into feature/zs_v1.3_risk
This commit is contained in:
@@ -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,49 @@ function setClientCash() {
|
||||
$("#ClientCashCNY").val(res.CNY);
|
||||
$("#ClientCashUSD").val(res.USD);
|
||||
}
|
||||
})
|
||||
});
|
||||
main.post("/trade_span/GetClientLatestBalance", { clientId: clientId }).done(function (data) {
|
||||
winloss = numFormart(data.WinLoss);
|
||||
netFund = numFormart(data.NetFund);
|
||||
vmFund = numFormart(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 numFormart(num) {
|
||||
num = num || 0;
|
||||
var result = numeral(num).format("0,0.00") === "NaN" ? "0.00" : numeral(num).format("0,0.00");
|
||||
if (result === "-0.00") {
|
||||
result = "0.00";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
cardInputMgr.init();
|
||||
|
||||
@@ -1155,6 +1155,10 @@ var vue = new Vue({
|
||||
this.swapflow.ClientId = client.id;
|
||||
this.swapflow.ClientName = client.Name;
|
||||
},
|
||||
//变更标的单价
|
||||
changeSpotPrice() {
|
||||
this.swapflow.TradingAmount = main.toNumber(this.swapflow.TradingAmountAvg * this.swapflow.TradingQty * this.swapflow.ContractSize*100, 2);
|
||||
},
|
||||
deleteSwapflow(id, st) {
|
||||
main.confirm("确定要删除吗?", function () {
|
||||
main.post("/swaptrade2/DeleteSwapflow?enid=" + id + "&step=" + st).done(function (resp) {
|
||||
|
||||
@@ -37,16 +37,16 @@ const colModelGrid = (new function () {
|
||||
return html;
|
||||
}
|
||||
},
|
||||
// { label: 'OA状态', name: 'OAStatus', width: 100, align: 'center' },
|
||||
//{ label: 'OA-URL', name: 'OAURL', width: 150, align: 'center',
|
||||
// formatter: function (cellValue, options, rowObject) {
|
||||
// if (cellValue && cellValue.length > 0) {
|
||||
// return '<a href="' + cellValue + '" target="_blank">查看</a>';
|
||||
// }
|
||||
// return '';
|
||||
// }
|
||||
//},
|
||||
//{ label: 'OA消息', name: 'OAMessage', width: 150, align: 'left' },
|
||||
{ label: 'OA状态', name: 'OAStatus', width: 100, align: 'center' },
|
||||
{ label: 'OA-URL', name: 'OAURL', width: 150, align: 'center',
|
||||
formatter: function (cellValue, options, rowObject) {
|
||||
if (cellValue && cellValue.length > 0) {
|
||||
return '<a href="' + cellValue + '" target="_blank">查看</a>';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{ label: 'OA消息', name: 'OAMessage', width: 150, align: 'left' },
|
||||
{ label: '交易数量', name: 'tradeCount', width: 80, align: 'center' },
|
||||
{ label: 'tradeIds', name: 'tradeIds', hidden: true, optionHide: true }];
|
||||
this.upload = function (encryptId, sendMail) {
|
||||
@@ -166,7 +166,7 @@ $(function () {
|
||||
// $("#batchSendMailBtn").click(BatchSendMail);
|
||||
initJqGrid();
|
||||
SendEmailHub()
|
||||
// SendOAHub(); // 初始化OA发送功能
|
||||
SendOAHub(); // 初始化OA发送功能
|
||||
});
|
||||
|
||||
// 初始化jqGrid函数
|
||||
@@ -259,8 +259,8 @@ function showToolName(cellValue, options, rowObject) {
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" value=\"上传\" onclick=\"colModelGrid.uploadNew('{0}')\" {1} />".template(rowObject.ContractCode, canUpload);
|
||||
|
||||
// 添加发送OA按钮
|
||||
//html += "<input type=\"button\" class=\"wentiEdit\" title='发送交易确认书到OA系统' onclick=\"sendOA('{0}')\" value=\"发送OA\" />"
|
||||
// .template(rowObject.id);
|
||||
html += "<input type=\"button\" class=\"wentiEdit\" title='发送交易确认书到OA系统' onclick=\"sendOA('{0}')\" value=\"发送OA\" />"
|
||||
.template(rowObject.id);
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user