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

97 lines
3.2 KiB
Plaintext

@{
Layout = "~/Views/Shared/_InfoLayout.cshtml";
}
@section CSS{
<style>
#table {
margin: 20px 50px;
}
td {
min-width: 100px;
}
.center {
text-align: center;
}
</style>
}
@section JS
{
<script>
$(document).ready(function () {
var ObservationDates = sessionStorage.getItem("observationdates");
var fields = ObservationDates.split(';');
var fieldList0 = fields[0].split(',');
var fieldList1 = fields[1] ? fields[1].split(',') : "";
var fieldList2 = fields[2] ? fields[2].split(',') : "";
var showCheck = false;//是否结算
if (fieldList2.length > 0) {
var checkfirst = fieldList2[0];
if (checkfirst == "true" || checkfirst == "false") {
showCheck = true;
}
}
var str = "<tr>";
str += "<td>日期</td>";
if ("@ViewBag.Title1") {
str += "<td class='center'>" + "@ViewBag.Title1" + "</td>";
}
if ("@ViewBag.Title2") {
str += "<td class='center'>" + "@ViewBag.Title2" + "</td>";
}
if (showCheck) {
str += "<td class='center'>是否结算</td>";
}
str += "</tr>";
$.each(fieldList0, function (i) {
str += "<tr>";
str += "<td>" + fieldList0[i] + "</td>";
if ("@ViewBag.Title1") {
if (!isNaN(parseFloat(fieldList1[i]))) {
if ("@ViewBag.IsTitle1Percent" === "True") {
str += "<td class='center'>" + otcformat.trading.umpriceP(fieldList1[i]) + "</td>";
}
else {
str += "<td class='center'>" + otcformat.trading.umprice(fieldList2[i]) + "</td>";
}
}
else {
str += "<td class='center'></td>";
}
}
if ("@ViewBag.Title2") {
if (!isNaN(parseFloat(fieldList2[i]))) {
if ("@ViewBag.IsTitle2Percent" === "True") {
str += "<td class='center'>" + otcformat.trading.umpriceP(fieldList2[i]) + "</td>";
}
else {
str += "<td class='center'>" + otcformat.trading.umprice(fieldList2[i]) + "</td>";
}
}
else {
str += "<td class='center'></td>";
}
}
if (showCheck) {
var checked = "否";
if (fieldList2[i] == 'true') {
checked = "是";
}
str += "<td class='center'>" + checked + "</td>";
}
str += "</tr>";
});
$("#table").html(str);
});
</script>
}
<html>
<body>
<table id="table"></table>
</body>
</html>