187 lines
7.3 KiB
Plaintext
187 lines
7.3 KiB
Plaintext
@model List<ProcessTradeLog>
|
|
@{
|
|
ViewBag.Title = "processtradelog内部列表";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
|
|
var generateAmendDoc = PS.Config.TradeElement.IsGenerateAmendDoc;
|
|
var needSendChangeEmail = PS.Config.TradeElement.IsAmendableAfterConfirm && PS.Config.TradeElement.IsGenerateAmendDoc;
|
|
}
|
|
|
|
@section CSS{
|
|
<style>
|
|
th, td {
|
|
text-align: center;
|
|
}
|
|
</style>
|
|
}
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
var temp_pagesize = 50;
|
|
//加载第一页
|
|
loadprocesstradelogInnerList(temp_pagesize, 1);
|
|
});
|
|
var g_gmsid = 'toaddfrombak';
|
|
function loadprocesstradelogInnerList(pagesize, pageindex) {
|
|
var param = { tradeId:@ViewBag.eid };
|
|
param.page = pageindex;
|
|
param.rows = pagesize;
|
|
$.ajax({
|
|
type: "Post",
|
|
url: "/processtradelog/processtradelogInnerListQuery",
|
|
data: { req: param, d: new Date() },
|
|
success: function (data) {
|
|
var trhtml = "";
|
|
var tdtemplate = "<td>{0}</td>";
|
|
for (var i = 0; i < data.rows.length; i++) {
|
|
trhtml += "<tr>";
|
|
trhtml += tdtemplate.template(data.rows[i].OptName);
|
|
trhtml += tdtemplate.template(data.rows[i].ProcessStatus);
|
|
trhtml += tdtemplate.template(data.rows[i].Log);
|
|
trhtml += tdtemplate.template(data.rows[i].TradeNumber == undefined ? "" : data.rows[i].TradeNumber);
|
|
trhtml += tdtemplate.template(data.rows[i].CreateTime);
|
|
trhtml += "/<tr>";
|
|
}
|
|
$("#tbodyprocesstradelog").html(trhtml);
|
|
},
|
|
error: function (msg) {
|
|
alert("error:" + msg);
|
|
}
|
|
});
|
|
}
|
|
|
|
function submit(status) {
|
|
var tradeId = '@ViewBag.eid';
|
|
var text = $("#text").val();
|
|
var pop = '';
|
|
if (status === 'pass') {
|
|
pop = "确认通过审批?";
|
|
}
|
|
if (status === 'reject') {
|
|
pop = "确认拒绝?";
|
|
}
|
|
|
|
var confirmFunc = function (additionalProcessing) {
|
|
var pData = { tradeId: tradeId, status: status, text: text };
|
|
if (!main.isEmpty(additionalProcessing)) {
|
|
pData.additionalProcessing = additionalProcessing;
|
|
}
|
|
main.post("/processtradelog/UpdateTradeProcessLog", pData).done(
|
|
function (data) {
|
|
if (data.obj && data.obj.proccessType == "AdditionalProcessing") {
|
|
if (data.obj.type == "LackOfMoney") {
|
|
var htmlContent = `<div style="padding:10px">${data.obj.message}</div>`;
|
|
var lackMoneyConfirmLayer = main.open2("提示",
|
|
htmlContent,
|
|
{
|
|
area: ["430px", "175px"],
|
|
btn: ['交易特批', '取消'],
|
|
yes: function (index, layero) {
|
|
var layerIndex = lackMoneyConfirmLayer;
|
|
main.confirm("客户资金或授信不足,强制成交会导致本机构产生风险!要继续审批通过?", function () {
|
|
layer.close(layerIndex);
|
|
confirmFunc("LackOfMoney");
|
|
});
|
|
},
|
|
cancel: function (index, layero) {
|
|
if (window.parent && window.parent.reloadtrade) {
|
|
window.parent.reloadtrade();
|
|
}
|
|
(parent || window).layer.closeAll();
|
|
}
|
|
});
|
|
console.log("lackMoneyConfirmLayer:" + lackMoneyConfirmLayer);
|
|
}
|
|
return;
|
|
}
|
|
(parent || window).main.message(data.msg);
|
|
|
|
@if (generateAmendDoc)
|
|
{
|
|
<text>
|
|
if (data.obj && data.obj.generateChangeSuccess) {
|
|
main.downloadFiles(data.obj.url);
|
|
try { window.parent.reloadtrade(); } catch (e) { }
|
|
}
|
|
</text>
|
|
}
|
|
@if (needSendChangeEmail)
|
|
{
|
|
<text>
|
|
if (data.obj && data.obj.generateChangeSuccess) {
|
|
main.confirm("确认发送变更确认书?",
|
|
function () {
|
|
main.post("/trade/SendChangeConfirmEmails", { tradeids: tradeId }).done(
|
|
function (data) {
|
|
if (data.success) {
|
|
main.message("发送成功");
|
|
} else {
|
|
main.message(data.msg);
|
|
}
|
|
try {
|
|
window.parent.reloadtrade();
|
|
} catch (e) {
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
try {
|
|
window.parent.reloadtrade();
|
|
} catch (e) {
|
|
}
|
|
}
|
|
</text>
|
|
}
|
|
else
|
|
{
|
|
<text>
|
|
try { window.parent.reloadtrade(); } catch (e) { }
|
|
</text>
|
|
}
|
|
if (parent) {
|
|
parent.layer.closeAll();
|
|
}
|
|
});
|
|
}
|
|
|
|
main.confirm(pop, confirmFunc);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<div class="yc-panel">
|
|
<table class="table">
|
|
<colgroup>
|
|
<col span="1" width="100" />
|
|
<col span="1" width="100" />
|
|
<col span="1" width="200" />
|
|
<col span="1" width="150" />
|
|
<col span="1" width="150" />
|
|
</colgroup>
|
|
<tr>
|
|
<th>操作人</th>
|
|
<th>流程状态</th>
|
|
<th>说明</th>
|
|
<th>交易编号</th>
|
|
<th>操作时间</th>
|
|
</tr>
|
|
<tbody id="tbodyprocesstradelog"></tbody>
|
|
</table>
|
|
|
|
<hr />
|
|
<div style="text-align: center;margin: 10px">
|
|
<div class="input-group" style="width: 100%">
|
|
<input id="text" type="text" class="form-control" placeholder="审批说明..." multiple="multiple">
|
|
</div>
|
|
<div style="margin-top: 10px">
|
|
<span class="input-group-btn">
|
|
@MyControls.Btn("审批通过", "submit('pass')")
|
|
</span>
|
|
<span class="input-group-btn">
|
|
@MyControls.Btn("拒绝", "submit('reject')")
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|