|
@@ -1,131 +1,131 @@
|
|
{{define "projectList.html"}}
|
|
{{define "projectList.html"}}
|
|
-<!DOCTYPE html>
|
|
|
|
-<html lang="en">
|
|
|
|
-<head>
|
|
|
|
- <meta charset="UTF-8">
|
|
|
|
- <title>项目列表页面</title>
|
|
|
|
- <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
|
|
|
- <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
|
|
|
|
-</head>
|
|
|
|
-<body>
|
|
|
|
-<div id="projectList">
|
|
|
|
- <input type="text" id="projectName" placeholder="请输入项目名">
|
|
|
|
- <input type="text" id="winner" placeholder="请输入中标企业名">
|
|
|
|
- <input type="text" id="bidTime" placeholder="请输入中标日期">
|
|
|
|
- <button type="button" id="projectListBtn">提交</button>
|
|
|
|
-</div>
|
|
|
|
-<div id="resultContent"></div>
|
|
|
|
-<div id="tableDiv" hidden>
|
|
|
|
- <table border="0" id="tableId">
|
|
|
|
- <thead>
|
|
|
|
- <tr class="tableTitle">
|
|
|
|
- {{/*
|
|
|
|
|
|
+ <!DOCTYPE html>
|
|
|
|
+ <html lang="en">
|
|
|
|
+ <head>
|
|
|
|
+ <meta charset="UTF-8">
|
|
|
|
+ <title>项目列表页面</title>
|
|
|
|
+ <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
|
|
|
+ <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
|
|
|
|
+ </head>
|
|
|
|
+ <body>
|
|
|
|
+ <div id="projectList">
|
|
|
|
+ <input type="text" id="projectName" placeholder="请输入项目名">
|
|
|
|
+ <input type="text" id="winner" placeholder="请输入中标企业名">
|
|
|
|
+ <input type="text" id="bidTime" placeholder="请输入中标日期">
|
|
|
|
+ <button type="button" id="projectListBtn">提交</button>
|
|
|
|
+ </div>
|
|
|
|
+ <div id="resultContent"></div>
|
|
|
|
+ <div id="tableDiv" hidden>
|
|
|
|
+ <table border="0" id="tableId">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr class="tableTitle">
|
|
|
|
+ {{/*
|
|
<th style="width: 20px"><input type="checkbox" name="item">
|
|
<th style="width: 20px"><input type="checkbox" name="item">
|
|
</td></th>*/}}
|
|
</td></th>*/}}
|
|
- <th style="width: 5%;">序号</th>
|
|
|
|
- <th style="width: 20%">项目标识</th>
|
|
|
|
- <th style="width: 36%">项目名称</th>
|
|
|
|
- <th style="width: 15%">采购单位</th>
|
|
|
|
- <th style="width: 8%">采购单位行业</th>
|
|
|
|
- <th style="width: 8%">招标日期</th>
|
|
|
|
- <th style="width: 8%">中标日期</th>
|
|
|
|
- </tr>
|
|
|
|
- </thead>
|
|
|
|
- <tbody class="box">
|
|
|
|
|
|
+ <th style="width: 5%;">序号</th>
|
|
|
|
+ <th style="width: 20%">项目标识</th>
|
|
|
|
+ <th style="width: 36%">项目名称</th>
|
|
|
|
+ <th style="width: 15%">采购单位</th>
|
|
|
|
+ <th style="width: 8%">采购单位行业</th>
|
|
|
|
+ <th style="width: 8%">招标日期</th>
|
|
|
|
+ <th style="width: 8%">中标日期</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody class="box">
|
|
|
|
|
|
- </tbody>
|
|
|
|
- </table>
|
|
|
|
-</div>
|
|
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
|
|
-</body>
|
|
|
|
-<style>
|
|
|
|
- .box tr .td {
|
|
|
|
- text-align: center;
|
|
|
|
- }
|
|
|
|
-</style>
|
|
|
|
-<script>
|
|
|
|
- var LocString = String(window.document.location.href);
|
|
|
|
|
|
+ </body>
|
|
|
|
+ <style>
|
|
|
|
+ .box tr .td {
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+ <script>
|
|
|
|
+ var LocString = String(window.document.location.href);
|
|
|
|
|
|
- // 获取页面跳转传过来的参数
|
|
|
|
- function GetQueryString(name) {
|
|
|
|
- var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
|
|
|
|
- var tmp;
|
|
|
|
- if (tmp = rs) {
|
|
|
|
- return decodeURI(tmp[2])
|
|
|
|
|
|
+ // 获取页面跳转传过来的参数
|
|
|
|
+ function GetQueryString(name) {
|
|
|
|
+ var rs = new RegExp("(^|)" + name + "=([^&]*)(&|$)", "gi").exec(LocString);
|
|
|
|
+ var tmp;
|
|
|
|
+ if (tmp = rs) {
|
|
|
|
+ return decodeURI(tmp[2])
|
|
|
|
+ }
|
|
|
|
+ return "";
|
|
}
|
|
}
|
|
- return "";
|
|
|
|
- }
|
|
|
|
|
|
|
|
- var appid = GetQueryString("appId");
|
|
|
|
- var key = GetQueryString("key");
|
|
|
|
|
|
+ var appid = GetQueryString("appId");
|
|
|
|
+ var key = GetQueryString("key");
|
|
|
|
|
|
- function submit(param, rType, url, hearders, str) {
|
|
|
|
- $("#resultContent").text("正在查询中......");
|
|
|
|
- $.ajax({
|
|
|
|
- url: url,
|
|
|
|
- type: rType,
|
|
|
|
- headers: hearders,
|
|
|
|
- data: param,
|
|
|
|
- success: function (r) {
|
|
|
|
- if (r.data) {
|
|
|
|
- $("#tableDiv").show();
|
|
|
|
- $("#resultContent").text("");
|
|
|
|
- var str = "";
|
|
|
|
- for (var i = 0; i < r.data.length; i++) {
|
|
|
|
- var item = r.data[i]
|
|
|
|
- str += '<tr >';
|
|
|
|
- // str += '<td style="width: 20px"></td>';
|
|
|
|
- str += '<td class="td">' + (i + 1) + '</td>';
|
|
|
|
- str += "<td class=\"td\"><a href='javascript:void(0);' style='pointer:hand;' onclick=\"projectDetails('" + item.projectId + "')\">" + item.projectId + "</a></td>";
|
|
|
|
- // str += '<td class="td"><a href="javascript:void(0);" onclick="projectDetails()"> ' + item.projectId + '</a></td>';
|
|
|
|
- str += '<td>' + item.projectName + '</td>';
|
|
|
|
- str += '<td>' + item.buyer + '</td>';
|
|
|
|
- str += '<td class="td">' + item.buyerClass + '</td>';
|
|
|
|
- if (item.tenderDate == undefined || item.tenderDate == "") {
|
|
|
|
- str += '<td class="td"></td>';
|
|
|
|
- } else {
|
|
|
|
- str += '<td class="td">' + item.tenderDate + '</td>';
|
|
|
|
- }
|
|
|
|
- if (item.bidDate == undefined || item.bidDate == "") {
|
|
|
|
- str += '<td></td>';
|
|
|
|
- } else {
|
|
|
|
- str += '<td class="td">' + item.bidDate + '</td>';
|
|
|
|
|
|
+ function submit(param, rType, url, hearders, str) {
|
|
|
|
+ $("#resultContent").text("正在查询中......");
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: url,
|
|
|
|
+ type: rType,
|
|
|
|
+ headers: hearders,
|
|
|
|
+ data: param,
|
|
|
|
+ success: function (r) {
|
|
|
|
+ if (r.data) {
|
|
|
|
+ $("#tableDiv").show();
|
|
|
|
+ $("#resultContent").text("");
|
|
|
|
+ var str = "";
|
|
|
|
+ for (var i = 0; i < r.data.length; i++) {
|
|
|
|
+ var item = r.data[i]
|
|
|
|
+ str += '<tr >';
|
|
|
|
+ // str += '<td style="width: 20px"></td>';
|
|
|
|
+ str += '<td class="td">' + (i + 1) + '</td>';
|
|
|
|
+ str += "<td class=\"td\"><a href='javascript:void(0);' style='pointer:hand;' onclick=\"projectDetails('" + item.projectId + "')\">" + item.projectId + "</a></td>";
|
|
|
|
+ // str += '<td class="td"><a href="javascript:void(0);" onclick="projectDetails()"> ' + item.projectId + '</a></td>';
|
|
|
|
+ str += '<td>' + item.projectName + '</td>';
|
|
|
|
+ str += '<td>' + item.buyer + '</td>';
|
|
|
|
+ str += '<td class="td">' + item.buyerClass + '</td>';
|
|
|
|
+ if (item.tenderDate == undefined || item.tenderDate == "") {
|
|
|
|
+ str += '<td class="td"></td>';
|
|
|
|
+ } else {
|
|
|
|
+ str += '<td class="td">' + item.tenderDate + '</td>';
|
|
|
|
+ }
|
|
|
|
+ if (item.bidDate == undefined || item.bidDate == "") {
|
|
|
|
+ str += '<td></td>';
|
|
|
|
+ } else {
|
|
|
|
+ str += '<td class="td">' + item.bidDate + '</td>';
|
|
|
|
+ }
|
|
|
|
+ str += '</tr>';
|
|
}
|
|
}
|
|
- str += '</tr>';
|
|
|
|
|
|
+ $(".box").html(str);
|
|
|
|
+ } else {
|
|
|
|
+ $("#resultContent").text("查询成功,暂无数据");
|
|
}
|
|
}
|
|
- $(".box").html(str);
|
|
|
|
- } else {
|
|
|
|
- $("#resultContent").text(r.msg);
|
|
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $("#projectListBtn").on("click", function () {
|
|
|
|
+ var param = {
|
|
|
|
+ "app_id": appid,
|
|
|
|
+ "project_name": $("#projectName").val(),
|
|
|
|
+ "winner": $("#winner").val(),
|
|
|
|
+ "bid_time": $("#bidTime").val()
|
|
|
|
+ };
|
|
|
|
+ var url = "/sfis/api/v1/projectList";
|
|
|
|
+ var rType = "post";
|
|
|
|
+ var now = new Date().getTime();
|
|
|
|
+ var token = md5(appid + Math.round(now / 1000) + key);
|
|
|
|
+ var hearders = {
|
|
|
|
+ "timestamp": "" + Math.round(now / 1000),
|
|
|
|
+ "token": token
|
|
}
|
|
}
|
|
|
|
+ $("#tableDiv").hide();
|
|
|
|
+ submit(param, rType, url, hearders, "list");
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
|
|
- $("#projectListBtn").on("click", function () {
|
|
|
|
- var param = {
|
|
|
|
- "app_id": appid,
|
|
|
|
- "project_name": $("#projectName").val(),
|
|
|
|
- "winner": $("#winner").val(),
|
|
|
|
- "bid_time": $("#bidTime").val()
|
|
|
|
- };
|
|
|
|
- var url = "/sfis/api/v1/projectList";
|
|
|
|
- var rType = "post";
|
|
|
|
- var now = new Date().getTime();
|
|
|
|
- var token = md5(appid + Math.round(now / 1000) + key);
|
|
|
|
- var hearders = {
|
|
|
|
- "timestamp": "" + Math.round(now / 1000),
|
|
|
|
- "token": token
|
|
|
|
|
|
+ function projectDetails(obj) {
|
|
|
|
+ // var p = $(obj).parent().find("td:eq(1)").text();
|
|
|
|
+ // window.top.location.href = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
|
|
|
|
+ var targetUrl = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
|
|
|
|
+ window.open(targetUrl)
|
|
}
|
|
}
|
|
- $("#tableDiv").hide();
|
|
|
|
- submit(param, rType, url, hearders, "list");
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- function projectDetails(obj) {
|
|
|
|
- // var p = $(obj).parent().find("td:eq(1)").text();
|
|
|
|
- // window.top.location.href = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
|
|
|
|
- var targetUrl = "/page/projectDetailsPage?projectId=" + obj + "&appId=" + appid + "&key=" + key
|
|
|
|
- window.open(targetUrl)
|
|
|
|
- }
|
|
|
|
-</script>
|
|
|
|
-</html>
|
|
|
|
|
|
+ </script>
|
|
|
|
+ </html>
|
|
{{end}}
|
|
{{end}}
|