Files
fe_service_ebtp_frontend/public/bidOpening/bidOpening.html

243 lines
8.9 KiB
HTML
Raw Normal View History

2022-03-10 14:24:13 +08:00
<!DOCTYPE html>
<html lang="en">
2022-07-08 11:10:28 +08:00
<script type='text/javascript' src="../officecontrol/jquery.js"></script>
2022-03-10 14:24:13 +08:00
<head>
<meta charset="UTF-8">
<title>开标大厅-招标采购中心</title>
<link href="css/bidOpening.css" rel="stylesheet" type="text/css">
</head>
2022-07-08 11:10:28 +08:00
2022-03-10 14:24:13 +08:00
<body>
<!--内容区-->
<div>
<!--红头-->
<div class="headerArea">
<img src="images/logo.svg" alt="" width="30" class="headerPic" />
<h2>中远海运集团采购信息系统 招标采购中心</h2>
2022-03-10 14:24:13 +08:00
</div>
<!--//红头-->
<!--开标大厅-->
<div class="openMeeting">
<!--上部-->
<div class="meetingTop">
<!--当前时间-->
<div class="bidLeft">
<p>当前时间:</p>
<p id="dateTime">
2022-07-08 11:10:28 +08:00
<span></span>/
<span></span>/
<span></span>
<span></span>:
<span></span>:
<span></span>
2022-03-10 14:24:13 +08:00
</p>
</div>
<!--//当前时间 class="tableBlock"-->
<div class="tableBlock">
<table class="bidOpeningTable" cellpadding="0" cellspacing="0">
2022-07-08 11:10:28 +08:00
2022-03-10 14:24:13 +08:00
<thead>
<tr>
<th width="10%">序号</th>
<th width="20%" id="bdname">标段名称</th>
<th width="15%" id="bdnumber">标段编号</th>
<th width="15%">开标时间</th>
<th width="10%">开标状态</th>
<th width="*">操作</th>
</tr>
</thead>
<tbody id="dataDev">
2022-07-08 11:10:28 +08:00
<tr style="height: 0px;">
2022-03-10 14:24:13 +08:00
<th width="10%"></th>
<th width="21%"></th>
<th width="15%"></th>
<th width="15%"></th>
<th width="10%"></th>
<th width="*"></th>
</tr>
2022-07-08 11:10:28 +08:00
2022-03-10 14:24:13 +08:00
</tbody>
</table>
</div>
</div>
<!--//上部-->
<!--下部-->
<div class="meetingBottom">
<img src="images/elementPic.png" alt="" />
</div>
<!--//下部-->
</div>
<!--//开标大厅-->
</div>
<!--//内容区-->
<script>
var roomType = getQueryVariable("roomType");
var token = sessionStorage.getItem('Authorization');
var project = sessionStorage.getItem('projectData');
var obj = JSON.parse(project);
var roleData = sessionStorage.getItem('roleData');
var role = JSON.parse(roleData);
var roleCode = role.roleCode;
var tpId = obj.id;
var proMethod = obj.bidMethodDict;
2022-07-08 11:10:28 +08:00
if (proMethod === "procurement_mode_1" || proMethod === "procurement_mode_2") {
2022-03-10 14:24:13 +08:00
$("#bdname").text("标段名称");
$("#bdnumber").text("标段编号");
} else {
$("#bdname").text("采购包名称");
$("#bdnumber").text("采购包编号");
}
$.ajax({
2022-07-08 11:10:28 +08:00
url: "/api/biz-service-ebtp-opening/v1/bizbidopenroom/openRoomList/" + tpId,
data: {
pageNo: "1",
pageSize: "1000",
roomType: roomType
2022-03-10 14:24:13 +08:00
},
2022-07-08 11:10:28 +08:00
headers: {
"Authorization": token
2022-03-10 14:24:13 +08:00
},
2022-07-08 11:10:28 +08:00
type: "GET",
success: function (re) {
2022-03-10 14:24:13 +08:00
var list = re.data.records;
var tr = "";
2022-07-08 11:10:28 +08:00
for (var i = 0; i < list.length; i++) {
tr = tr + "<tr>";
tr = tr + "<td>" + (i + 1) + "</td>";
tr = tr + "<td>" + (list[i].sectionName) + "</td>";
tr = tr + "<td>" + (list[i].sectionNo) + "</td>";
tr = tr + "<td>" + (list[i].opingTime) + "</td>";
tr = tr + "<td>" + (getRoomStateValue(list[i].roomState)) + "</td>";
tr = tr + "<td>";
if (list[i].roomState != "9") {
tr = tr + "<button type='button' onClick=onClickToOpenRoom('" + list[i].assessRoomId + "'," + list[i].turnSort + ",'" + list[i].id + "'," + list[i].roomType + "," + list[i].roomState + ") class='bidBtn01'>在线唱标</button>";
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
if (roleCode == "ebtp-agency-project-manager" || roleCode == "ebtp-purchase") {
2022-03-10 14:24:13 +08:00
var openTime = list[i].opingTime;
2022-07-08 11:10:28 +08:00
tr = tr + "<button type='button' onClick=onClickDown('" + list[i].id + "','" + list[i].sectionId + "') class='bidBtn02'>导出投递记录</button></td>";
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
tr = tr + "</tr>";
2022-03-10 14:24:13 +08:00
}
$("#dataDev").html("");
$("#dataDev").append("<tr style='height: 0px;' id='dataTr'></tr>");
$("#dataTr").append("<th width='10%'></th>")
2022-07-08 11:10:28 +08:00
.append("<th width='21%'></th>")
.append("<th width='15%'></th>")
.append("<th width='15%'></th>")
.append("<th width='10%'></th>")
.append("<th width='*'></th>");
2022-03-10 14:24:13 +08:00
$("#dataDev").append(tr);
}
});
2022-07-08 11:10:28 +08:00
function getRoomStateValue(state) {
2022-03-10 14:24:13 +08:00
// 0未开标 1、开标 2、唱标 3、唱标结束 4、取消开标'
var value = "";
2022-07-08 11:10:28 +08:00
if (state == "0") {
value = "未开标";
}
if (state == "1") {
value = "已开标";
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
if (state == "2") {
value = "唱标";
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
if (state == "3") {
value = "唱标结束";
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
if (state == "4") {
value = "取消开标";
}
if (state == "9") {
value = "异常处理";
2022-03-10 14:24:13 +08:00
}
return value;
};
var n = 0;
var y = 0;
var t = 0;
var h = 0;
var m = 0;
var s = 0;
var timestamp = 0;
2022-07-08 11:10:28 +08:00
function getTime() {
2022-03-10 14:24:13 +08:00
$.ajax({
2022-07-08 11:10:28 +08:00
url: "/api/biz-service-ebtp-extend/v1/timeService/getServiceSystemTime",
headers: {
"Authorization": token
2022-03-10 14:24:13 +08:00
},
2022-07-08 11:10:28 +08:00
type: "GET",
success: function (re) {
2022-03-10 14:24:13 +08:00
n = re.data.year;
y = re.data.month;
t = re.data.date;
h = re.data.hour;
m = re.data.minute;
s = re.data.second;
timestamp = re.data.timestamp;
}
2022-07-08 11:10:28 +08:00
});
2022-03-10 14:24:13 +08:00
}
getTime();
setInterval(getTime, 30000);
function time() {
2022-07-08 11:10:28 +08:00
s = s + 1;
if (s == 60) {
2022-03-10 14:24:13 +08:00
s = 1;
2022-07-08 11:10:28 +08:00
m = m + 1;
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
if (m == 60) {
2022-03-10 14:24:13 +08:00
m = 1;
2022-07-08 11:10:28 +08:00
h = h + 1;
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
if (h == 24) {
2022-03-10 14:24:13 +08:00
h = 0;
2022-07-08 11:10:28 +08:00
t = t + 1;
}
$('#dateTime span').eq(0).html(n);
$('#dateTime span').eq(1).html(y < 10 ? "0" + y : y);
$('#dateTime span').eq(2).html(t < 10 ? "0" + t : t);
$('#dateTime span').eq(3).html(h < 10 ? "0" + h : h);
$('#dateTime span').eq(4).html(m < 10 ? "0" + m : m);
$('#dateTime span').eq(5).html(s < 10 ? "0" + s : s);
for (var i = 0; i < $('#dateTime').length; i++) {
if ($('div').eq(i).text().length == 1) {
$('div').eq(i).html(function (index, html) {
return 0 + html;
});
}
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
}
time();
setInterval(time, 1000);
function onClickToOpenRoom(aa, bb, cc, roomType, roomState) {
if (roomState == 0) {
window.open("countDown.html?aa=" + aa + "&bb=" + bb + "&cc=" + cc + "&roomType=" + roomType);
} else if (roomState > 0) {
window.open("/room/index?aa=" + aa + "&bb=" + bb + "&roomType=" + roomType);
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
}
function onClickDown(id, bsId) {
window.open("/api/biz-service-ebtp-opening/v1/bizbidopenroom/exportTenderRecords/" + bsId + "?roomType=" + roomType);
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
function getQueryVariable(variable) {
2022-03-10 14:24:13 +08:00
var query = window.location.search.substring(1);
var vars = query.split("&");
2022-07-08 11:10:28 +08:00
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) { return pair[1]; }
2022-03-10 14:24:13 +08:00
}
2022-07-08 11:10:28 +08:00
return (false);
2022-03-10 14:24:13 +08:00
}
</script>
</body>
2022-07-08 11:10:28 +08:00
2022-03-10 14:24:13 +08:00
</html>