393 lines
15 KiB
Plaintext
393 lines
15 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SESEvaluateList.aspx.cs" Inherits="FineUIPro.Web.SES.SESEvaluateList" EnableEventValidation="false" %>
|
||
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head runat="server">
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title></title>
|
||
<script src="../Scripts/jquery-3.7.1.min.js"></script>
|
||
<script src="../Scripts/startScore.js"></script>
|
||
<script src="../Scripts/layer/layer.js"></script>
|
||
|
||
<style>
|
||
table.gridtable {
|
||
width: 100%;
|
||
font-family: verdana,arial,sans-serif;
|
||
font-size: 11px;
|
||
color: #333333;
|
||
border-width: 1px;
|
||
border-color: #666666;
|
||
border-collapse: collapse;
|
||
}
|
||
|
||
table.gridtable th {
|
||
border-width: 1px;
|
||
padding: 8px;
|
||
border-style: solid;
|
||
border-color: #666666;
|
||
background-color: #dedede;
|
||
}
|
||
|
||
table.gridtable td {
|
||
border-width: 1px;
|
||
padding: 8px;
|
||
border-style: solid;
|
||
border-color: #666666;
|
||
background-color: #ffffff;
|
||
text-align: center;
|
||
}
|
||
|
||
/*星星样式*/
|
||
.content {
|
||
width: 600px;
|
||
margin: 0 auto;
|
||
padding-top: 20px;
|
||
}
|
||
|
||
.title {
|
||
font-size: 14px;
|
||
background: #dfdfdf;
|
||
padding: 10px;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.block {
|
||
width: 100%;
|
||
margin: 0 0 20px 0;
|
||
padding-top: 10px;
|
||
padding-right: 10px;
|
||
line-height: 21px;
|
||
}
|
||
|
||
.block .star_score {
|
||
float: left;
|
||
}
|
||
|
||
.star_list {
|
||
height: 21px;
|
||
margin: 50px;
|
||
line-height: 21px;
|
||
}
|
||
|
||
.block p, .block .attitude {
|
||
padding-left: 20px;
|
||
line-height: 21px;
|
||
display: inline-block;
|
||
}
|
||
|
||
.block p span {
|
||
color: #C00;
|
||
font-size: 16px;
|
||
font-family: Georgia, "Times New Roman", Times, serif;
|
||
}
|
||
|
||
.star_score {
|
||
background: url(../Images/stark2.png);
|
||
width: 160px;
|
||
height: 21px;
|
||
position: relative;
|
||
}
|
||
|
||
.star_score a {
|
||
height: 21px;
|
||
display: block;
|
||
text-indent: -999em;
|
||
position: absolute;
|
||
left: 0;
|
||
}
|
||
|
||
.star_score a:hover {
|
||
background: url(../Images/stars2.png);
|
||
left: 0;
|
||
}
|
||
|
||
.star_score a.clibg {
|
||
background: url(../Images/stars2.png);
|
||
left: 0;
|
||
}
|
||
|
||
.start .star_score {
|
||
background: url(../Images/starky.png);
|
||
}
|
||
|
||
.start .star_score a:hover {
|
||
background: url(../Images/starsy.png);
|
||
left: 0;
|
||
}
|
||
|
||
.start .star_score a.clibg {
|
||
background: url(../Images/starsy.png);
|
||
left: 0;
|
||
}
|
||
/*星星样式*/
|
||
.show_number {
|
||
padding-left: 50px;
|
||
padding-top: 20px;
|
||
}
|
||
|
||
.show_number li {
|
||
width: 240px;
|
||
border: 1px solid #ccc;
|
||
padding: 10px;
|
||
margin-right: 5px;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.atar_Show {
|
||
background: url(../Images/stark2.png);
|
||
width: 160px;
|
||
height: 21px;
|
||
position: relative;
|
||
float: left;
|
||
}
|
||
|
||
.atar_Show p {
|
||
background: url(../Images/stars2.png);
|
||
left: 0;
|
||
height: 21px;
|
||
width: 134px;
|
||
}
|
||
|
||
.show_number li span {
|
||
display: inline-block;
|
||
line-height: 21px;
|
||
}
|
||
</style>
|
||
|
||
</head>
|
||
<body>
|
||
<form id="form1" runat="server">
|
||
<asp:ScriptManager ID="ScriptManager1" runat="server">
|
||
</asp:ScriptManager>
|
||
<div>
|
||
<table class="gridtable">
|
||
<thead>
|
||
<tr>
|
||
<th colspan="2">操作</th>
|
||
<th colspan="8" style="text-align: left">
|
||
<asp:Button runat="server" ID="btuSave" OnClick="btuSave_Click" Text="保存" OnClientClick="return btnSave()" />
|
||
</th>
|
||
</tr>
|
||
<tr>
|
||
<th>No.</th>
|
||
<th>FO NO</th>
|
||
<th>Score1</th>
|
||
<th>Score2</th>
|
||
<th>Score3</th>
|
||
<th>Score4</th>
|
||
<th>Score5</th>
|
||
<th>Score6</th>
|
||
<th>Score7</th>
|
||
<th>附件上传</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<asp:Repeater ID="RepeaterList" runat="server">
|
||
<ItemTemplate>
|
||
<tr onclick="SESReportBrid(this)">
|
||
<td fono='<%#Eval("FO_NO") %>'>
|
||
<%# Container.ItemIndex + 1%>
|
||
</td>
|
||
<td>
|
||
<span class="fenshu" id="foNo<%# Container.ItemIndex + 1%>"><%#Eval("FO_NO") %></span>
|
||
<asp:HiddenField runat="server" ID="hidFoNo" Value='<%#Eval("FO_NO") %>' />
|
||
</td>
|
||
<td>
|
||
<div id="startone<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="spone<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<div id="starttwo<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="sptwo<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<div id="startthree<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="spthree<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<div id="startfour<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="spfour<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<div id="startfive<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="spfive<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<div id="startsix<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="spsix<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<div id="startseven<%# Container.ItemIndex + 1%>" class="block start">
|
||
<div class="star_score"></div>
|
||
<span class="fenshu" id="spseven<%# Container.ItemIndex + 1%>"></span>
|
||
</div>
|
||
</td>
|
||
<td>
|
||
<asp:FileUpload ID="fileUpload" runat="server" BorderWidth="0" />
|
||
</td>
|
||
</tr>
|
||
</ItemTemplate>
|
||
</asp:Repeater>
|
||
<asp:HiddenField runat="server" ID="hidRowNum" />
|
||
<asp:HiddenField runat="server" ID="hidRowValue" />
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<!--FC_SESReport-->
|
||
<br />
|
||
<br />
|
||
<div>
|
||
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
|
||
<ContentTemplate>
|
||
<table class="gridtable">
|
||
<thead>
|
||
<tr>
|
||
<th>No.</th>
|
||
<th>FO</th>
|
||
<th>SES No</th>
|
||
<th>Short Descrption</th>
|
||
<th>Vendor Name</th>
|
||
<th>SSR budget</th>
|
||
<th>Currency</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="sesTable">
|
||
<td colspan="7" style="text-align: center">暂无数据...</td>
|
||
</tbody>
|
||
</table>
|
||
|
||
</ContentTemplate>
|
||
</asp:UpdatePanel>
|
||
</div>
|
||
</form>
|
||
</body>
|
||
</html>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
xinBrid();
|
||
});
|
||
|
||
//星星绑定
|
||
function xinBrid() {
|
||
if ($("#hidRowNum").val() != undefined && $("#hidRowNum").val() != "0" && $("#hidRowNum").val() != "") {
|
||
for (var i = 1; i <= parseInt($("#hidRowNum").val()); i++) {
|
||
scoreFun($("#startone" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
scoreFun($("#starttwo" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
scoreFun($("#startthree" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
scoreFun($("#startfour" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
scoreFun($("#startfive" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
scoreFun($("#startsix" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
scoreFun($("#startseven" + i + ""), {
|
||
fen_d: 22,//每一个a的宽度
|
||
ScoreGrade: 5//a的个数 10或者
|
||
});
|
||
}
|
||
}
|
||
//显示分数
|
||
$(".show_number li p").each(function (index, element) {
|
||
var num = $(this).attr("tip");
|
||
var www = num * 2 * 16;//
|
||
$(this).css("width", www);
|
||
//$(this).parent(".atar_Show").siblings("span").text(num);
|
||
});
|
||
}
|
||
//保存
|
||
function btnSave() {
|
||
var result = true;
|
||
if ($("#hidRowNum").val() != undefined && $("#hidRowNum").val() != "0" && $("#hidRowNum").val() != "") {
|
||
var rowValue = "";
|
||
var message = "";
|
||
for (var i = 1; i <= parseInt($("#hidRowNum").val()); i++) {
|
||
var FO = $("#foNo" + i + "").text();
|
||
var oneScore = $("#spone" + i + "").text() == "" ? 0 : $("#spone" + i + "").text();
|
||
var twoSocre = $("#sptwo" + i + "").text() == "" ? 0 : $("#sptwo" + i + "").text();
|
||
var threeScore = $("#spthree" + i + "").text() == "" ? 0 : $("#spthree" + i + "").text();
|
||
var fourScore = $("#spfour" + i + "").text() == "" ? 0 : $("#spfour" + i + "").text();
|
||
var fiveScore = $("#spfive" + i + "").text() == "" ? 0 : $("#spfive" + i + "").text();
|
||
var sixScore = $("#spsix" + i + "").text() == "" ? 0 : $("#spsix" + i + "").text();
|
||
if (oneScore == 0 && twoSocre == 0 && threeScore == "" && fourScore == "" && fiveScore == "" && sixScore == "") {
|
||
message += "FO:(" + $("#foNo" + i + "").text() + ")Score not filled!<br/>";
|
||
}
|
||
rowValue += i == 1 ? FO + ',' + oneScore + "," + twoSocre + "," + threeScore + "," + fourScore + "," + fiveScore + "," + sixScore : "|" + FO + ',' + oneScore + "," + twoSocre + "," + threeScore + "," + fourScore + "," + fiveScore + "," + sixScore;
|
||
}
|
||
|
||
$("#hidRowValue").val(rowValue);
|
||
if (message != "") {
|
||
result = false;
|
||
layer.confirm('The following items are not filled in(' + message + ')Are you sure to save?', {
|
||
btn: ['确定', '取消'] //按钮
|
||
}, function () {
|
||
__doPostBack('btuSave', '1');
|
||
|
||
}, function () {
|
||
});
|
||
}
|
||
|
||
}
|
||
return result;
|
||
}
|
||
|
||
//点击触发绑定
|
||
function SESReportBrid(obj) {
|
||
var sesHrml = "";
|
||
var fono = $(obj).children("td").eq(0).attr("fono");
|
||
if (fono != undefined && fono != null) {
|
||
$.ajax({
|
||
type: "POST",
|
||
dataType: "text",
|
||
url: "SESReport.ashx",
|
||
data: { "FoNo": fono },
|
||
async: false,
|
||
success: function (result) {
|
||
sesReportJson = eval(result);
|
||
if (sesReportJson.length > 0) {
|
||
$("#sesTable").html("");
|
||
for (var i = 0; i < sesReportJson.length; i++) {
|
||
sesHrml += "<tr><td>" + i + "</td>" +
|
||
"<td>" + sesReportJson[i].FO + "</td>" +
|
||
"<td>" + sesReportJson[i].SES_No + "</td>" +
|
||
"<td>" + sesReportJson[i].Short_Descrption + "</td>" +
|
||
"<td>" + sesReportJson[i].Vendor_Name + "</td>" +
|
||
"<td>" + sesReportJson[i].SSR_budget + "</td>" +
|
||
"<td>" + sesReportJson[i].Currency + "</td></tr>";
|
||
}
|
||
}
|
||
}
|
||
});
|
||
$("#sesTable").append(sesHrml);
|
||
}
|
||
}
|
||
|
||
</script>
|