xs 5 лет назад
Родитель
Сommit
398b330ee0

+ 35 - 4
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListing.js

@@ -74,7 +74,22 @@ $(document).ready(function() {
                       
                    } 
                },
-              
+            onLoadSuccess:function(data){
+                jQuery(function(){
+                    //使用id选择器;例如:tab对象->tr->td对象.
+                    $("#moduleListingTable tr td").each(function(i){
+                        //获取td当前对象的文本,如果长度大于25;
+                        if($(this).text().length>10){
+                            //给td设置title属性,并且设置td的完整值.给title属性.
+                            $(this).attr("title",$(this).text());
+                            //获取td的值,进行截取。赋值给text变量保存.
+                            var text=$(this).text().substring(0,10)+"...";
+                            //重新为td赋值;
+                            $(this).text(text);
+                        }
+                    });
+                });
+            },
                onClickRow: function(row, $el){
                },
                	onShowSearch: function () {
@@ -86,68 +101,84 @@ $(document).ready(function() {
 		    }
                    ,{
                        field: 'mdName',
-                       title: '模块名称'
+                       title: '模块名称',
+                       width:130
                    }
                     ,{
                         field: 'mdBigClass',
-                        title: '模块大类'
+                        title: '模块大类',
+                       width:100
                     }
 
                    ,{
                        field: 'mdTheClass',
                        title: '模块中类',
+                       width:100
                    }
                    ,{
                        field: 'bigClassification',
                        title: '大分类',
+                       width:100
                    }
                    ,{
                        field: 'theClassification',
                        title: '中分类',
+                       width:100
                    }
                    ,{
                        field: 'smallClassification',
                        title: '小分类',
+                       width:100
                    }
                    ,{
                        field: 'materialCode',
                        title: '物料编码',
+                       width:110
                    }
                    ,{
                        field: 'materialDescription',
                        title: '物料描述',
+                       width:150
                    }
                    ,{
                        field: 'extensionDescription',
                        title: '扩展描述',
+                       width:150
                    }
                    ,{
                        field: 'mdUnits',
                        title: '单位',
+                       width:70
                    }
                    ,{
                        field: 'mdCount',
                        title: '数量',
+                       width:70
                    }
                    ,{
                        field: 'mdSingleWeight',
                        title: '单重',
+                       width:70
                    }
                    ,{
                        field: 'mdTotalWeight',
                        title: '总重',
+                       width:70
                    }
                    ,{
                        field: 'mdTheParty',
                        title: '甲乙供',
+                       width:100
                    }
                    ,{
                        field: 'mdText',
                        title: '备注',
+                       width:150
                    }
                    ,{
                        field: 'mdTotalAmount',
-                       title: '备注',
+                       title: '总量',
+                       width:100
                    }
 		     ]
 		

+ 1 - 1
src/main/webapp/webpage/modules/sg/managementcenter/moduleacquisition/moduleListing.jsp

@@ -46,7 +46,7 @@
 			</div>
 
 			<!-- 表格 -->
-			<table id="moduleListingTable"  data-toolbar="#toolbar"></table>
+			<table id="moduleListingTable"  style="table-layout:fixed"   data-toolbar="#toolbar"></table>
 
 			<!-- context menu -->
 			<ul id="context-menu" class="dropdown-menu">