|
@@ -1,13 +1,13 @@
|
|
|
<%@ page contentType="text/html;charset=UTF-8" %>
|
|
|
<script>
|
|
|
$(document).ready(function() {
|
|
|
+ $('#informationTable').bootstrapTable('hideLoading');
|
|
|
//定义方法---在bootstrap数据循环中使用,必须定义在bootstrapTable之前
|
|
|
window.operateEvents = {
|
|
|
'click #TableView': function (e, value, row, index) {
|
|
|
jp.openTab("${ctx}/sg/material?projectId="+row.projectId,'查看《'+row.projectName+'》物料情况', true);
|
|
|
}
|
|
|
};
|
|
|
- var h = $(window).height() - 100;
|
|
|
//bootstrapTable加载数据
|
|
|
$('#informationTable').bootstrapTable({
|
|
|
//请求方法
|
|
@@ -17,7 +17,6 @@ $(document).ready(function() {
|
|
|
contentType: "application/x-www-form-urlencoded",
|
|
|
//显示检索按钮
|
|
|
showSearch: true,
|
|
|
- height:h,
|
|
|
//显示刷新按钮
|
|
|
showRefresh: true,
|
|
|
//显示切换手机试图按钮
|
|
@@ -66,12 +65,9 @@ $(document).ready(function() {
|
|
|
onLoadSuccess: function () { //加载成功时执行
|
|
|
getTdValue();
|
|
|
},
|
|
|
- onShowSearch: function () {
|
|
|
- $("#search-collapse").slideToggle();
|
|
|
- },
|
|
|
- formatNoMatches:function(){
|
|
|
- return "你的自定义文字说明";
|
|
|
- },
|
|
|
+ onShowSearch: function () {
|
|
|
+ $("#search-collapse").slideToggle();
|
|
|
+ },
|
|
|
columns: [
|
|
|
{
|
|
|
field: 'projectId',
|
|
@@ -245,7 +241,11 @@ $(document).ready(function() {
|
|
|
events: operateEvents,
|
|
|
formatter: operateFormatter
|
|
|
}
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ formatNoMatches:function(){
|
|
|
+ return "没有对应数据";
|
|
|
+ },
|
|
|
+
|
|
|
});
|
|
|
|
|
|
function operateFormatter(value, row, index) {
|
|
@@ -261,11 +261,13 @@ $(document).ready(function() {
|
|
|
//加载完成后,对第二次是否完成领退料判断变并变更行样式
|
|
|
function getTdValue() {
|
|
|
var tableId = document.getElementById("informationTable");
|
|
|
+ if (tableId.rows.length>2){
|
|
|
for(var i = 1;i < tableId.rows.length;i++) {
|
|
|
- if(tableId.rows[i].cells[12].innerHTML.indexOf("是") != -1 || tableId.rows[i].cells[12].innerHTML.indexOf("否") != -1){
|
|
|
+ if(tableId.rows[i].cells[12].innerHTML!="-"){
|
|
|
tableId.rows[i].setAttribute("style","color: red;");
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
$("#hiddenSign").val("不是第一次加载")
|
|
|
}
|
|
|
|
|
@@ -508,6 +510,7 @@ $(document).ready(function() {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+
|
|
|
function getIdSelections() {
|
|
|
return $.map($("#informationTable").bootstrapTable('getSelections'), function (row) {
|
|
|
return row.id
|