12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
-
- function loadSuccessEvaluationTable(data) {
- if (data.length == 0) {
- return;
- }
- var evaluationTableID = $("#EvaluationTableID").combogridX("getValue");
- if (evaluationTableID != "" && evaluationTableID != "-1" && evaluationTableID != null) {
- loadColumsRank(evaluationTableID);
- }
- }
- function queryEvaluationTable() {
- var evaluationTableID = $("#EvaluationTableID").combogridX("getValue");
- if (evaluationTableID != "" && evaluationTableID != "-1" && evaluationTableID != null) {
- loadColumsRank(evaluationTableID);
- } else {
- loadColumsRank("");
- }
- }
- function loadColumsRank(evaluationTableID) {
- var dataColums = Invoke("/EvaluationForm/FormTitle", null, "jsonp", function (re) { });
- var dataList = Invoke("/EvaluationForm/Content?evaluationTableID=" + evaluationTableID, null, "jsonp", function (re) { });
- if (dataColums != undefined && dataColums != null) {
- if (dataList !== undefined && dataList != null) {
- var jsonData = { rows: eval("[" + dataList.rows + "]"), total: dataList.total };
- $("#dgEvaluationFormList").datagrid({
- columns: [[
- { field: 'OrderNo', title: '次序', width: 150, align: 'center' },
- { field: 'EvaluationProjectName', title: '评价项目', width: 350, align: 'center', formatter: formatCellTooltip },
- { field: 'Weight', title: '权重', width: 100, align: 'center' },
- { field: 'EvaluationNormName', title: '评分标准', width: 250, align: 'center' }]],
- data: jsonData,
- singleSelect: true,
- rownumbers: false,
- showFooter: true,
- striped: 'True',
- nowrap: true,
- fitColumns: false,
- rowStyler: function (index, row) {
- if (isNaN(row.OrderNo)) {
- return 'color:blue;';
- }
- }
- });
- }
- }
- }
- //格式化单元格提示信息
- function formatCellTooltip(val, rec) {
- return "<span title='" + val + "'>" + val + "</span>";
- }
- //设置列颜色为红色
- function SetRedColumn(index, row, value) {
- return " <span style=\"color: red;\">" + value + "</span>";
- }
|