|
@@ -0,0 +1,112 @@
|
|
|
+{{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="tableDiv" hidden>
|
|
|
+ <table border="0" id="tableId">
|
|
|
+ <thead>
|
|
|
+ <tr class="tableTitle">
|
|
|
+ {{/* <th style="width: 20px"><input type="checkbox" name="item"></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">
|
|
|
+
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </body>
|
|
|
+ <style>
|
|
|
+ .box tr .td {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script>
|
|
|
+ var appid = "sfGSVYRQMAAgkGBAUBJg4f";
|
|
|
+ var key = "364xw909";
|
|
|
+
|
|
|
+ function submit(param, rType, url, hearders, str) {
|
|
|
+ $.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 onclick="projectDetails(this)">';
|
|
|
+ // str += '<td style="width: 20px"></td>';
|
|
|
+ str += '<td class="td">' + (i + 1) + '</td>';
|
|
|
+ str += '<td class="td">' + item.project_id + '</td>';
|
|
|
+ str += '<td>' + item.projectname + '</td>';
|
|
|
+ str += '<td>' + item.buyer + '</td>';
|
|
|
+ str += '<td class="td">' + item.buyerclass + '</td>';
|
|
|
+ if (item.zbtime == undefined || item.zbtime == "") {
|
|
|
+ str += '<td class="td"></td>';
|
|
|
+ } else {
|
|
|
+ str += '<td class="td">' + item.zbtime + '</td>';
|
|
|
+ }
|
|
|
+ if (item.jgtime == undefined || item.jgtime == "") {
|
|
|
+ str += '<td></td>';
|
|
|
+ } else {
|
|
|
+ str += '<td class="td">' + item.jgtime + '</td>';
|
|
|
+ }
|
|
|
+ str += '</tr>';
|
|
|
+ }
|
|
|
+ $(".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");
|
|
|
+ })
|
|
|
+
|
|
|
+ function projectDetails(obj) {
|
|
|
+ var p = $(obj).find("td:eq(1)").text();
|
|
|
+ location.href = "/page/projectDetailsPage?projectId=" + p
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+ </html>
|
|
|
+{{end}}
|