|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .mat-msg { | 
|---|
|  |  |  | overflow: auto; | 
|---|
|  |  |  | overflow-y: scroll; | 
|---|
|  |  |  | margin-top: 10px; | 
|---|
|  |  |  | height: 115px; | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | border-radius: 5px; | 
|---|
|  |  |  | border: 1px solid #c2c2c2; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /* 堆垛机状态信息表 */ | 
|---|
|  |  |  | #mat-msg-table { | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | border-collapse: collapse; | 
|---|
|  |  |  | margin: 0 auto; | 
|---|
|  |  |  | text-align: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #mat-msg-table td, #mat-msg-table th { | 
|---|
|  |  |  | border: 1px solid #f1f1f1; | 
|---|
|  |  |  | color: #666; | 
|---|
|  |  |  | height: 15px; | 
|---|
|  |  |  | line-height: 15px; | 
|---|
|  |  |  | #tthead { | 
|---|
|  |  |  | padding-top: 4px; | 
|---|
|  |  |  | background-color: #ececec; | 
|---|
|  |  |  | height: 18px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #mat-msg-table thead th { | 
|---|
|  |  |  | background-color: #fff; | 
|---|
|  |  |  | width: 400px; | 
|---|
|  |  |  | font-weight: normal; | 
|---|
|  |  |  | #tthead span { | 
|---|
|  |  |  | border-right: 1px solid #b3b3b3; | 
|---|
|  |  |  | float: left; | 
|---|
|  |  |  | width: 24%; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #mat-msg-table tr:nth-child(odd) { | 
|---|
|  |  |  | background: #fff; | 
|---|
|  |  |  | #ttbody { | 
|---|
|  |  |  | padding-top: 4px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #mat-msg-table tr:nth-child(even) { | 
|---|
|  |  |  | background: #fff; | 
|---|
|  |  |  | #ttbody div { | 
|---|
|  |  |  | content: ""; | 
|---|
|  |  |  | clear: both; | 
|---|
|  |  |  | display: table; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #ttbody span { | 
|---|
|  |  |  | border-right: 1px solid #b3b3b3; | 
|---|
|  |  |  | float: left; | 
|---|
|  |  |  | width: 22%; | 
|---|
|  |  |  | overflow:hidden; | 
|---|
|  |  |  | white-space:nowrap; | 
|---|
|  |  |  | text-overflow:ellipsis; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #btn-con { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 堆垛机状态 --> | 
|---|
|  |  |  | <div class="mat-msg" id="mat-msg-id"> | 
|---|
|  |  |  | <table id="mat-msg-table"> | 
|---|
|  |  |  | <thead id="tthead"> | 
|---|
|  |  |  | <tr> | 
|---|
|  |  |  | <th>编码</th> | 
|---|
|  |  |  | <th>名称</th> | 
|---|
|  |  |  | <th>单位</th> | 
|---|
|  |  |  | <th>数量</th> | 
|---|
|  |  |  | </tr> | 
|---|
|  |  |  | </thead> | 
|---|
|  |  |  | <tbody id="ttbody"> | 
|---|
|  |  |  | </tbody> | 
|---|
|  |  |  | </table> | 
|---|
|  |  |  | <div id="mat-msg-table"> | 
|---|
|  |  |  | <div id="tthead"> | 
|---|
|  |  |  | <span>编码</span> | 
|---|
|  |  |  | <span>名称</span> | 
|---|
|  |  |  | <span>单位</span> | 
|---|
|  |  |  | <span>数量</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div id="ttbody"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div id="btn-con"> | 
|---|
|  |  |  | 
|---|
|  |  |  | function initCrnMsgTable(row) { | 
|---|
|  |  |  | var line; | 
|---|
|  |  |  | if (row === undefined){ | 
|---|
|  |  |  | var one = tthead.offsetHeight; | 
|---|
|  |  |  | var one = 15; | 
|---|
|  |  |  | var total = matMsg.offsetHeight; | 
|---|
|  |  |  | var count = total / one; | 
|---|
|  |  |  | count = parseInt(count) - 1; | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | line = row; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | var html = ""; | 
|---|
|  |  |  | for (var i = 0; i < line; i ++){ | 
|---|
|  |  |  | html += " <tr>\n" + | 
|---|
|  |  |  | "       <td>1</td>\n" + | 
|---|
|  |  |  | "       <td>2</td>\n" + | 
|---|
|  |  |  | "       <td>3</td>\n" + | 
|---|
|  |  |  | "       <td>4</td>\n" + | 
|---|
|  |  |  | "     </tr>\n"; | 
|---|
|  |  |  | html += " <div>\n" + | 
|---|
|  |  |  | "       <span></span>\n" + | 
|---|
|  |  |  | "       <span></span>\n" + | 
|---|
|  |  |  | "       <span></span>\n" + | 
|---|
|  |  |  | "       <span></span>\n" + | 
|---|
|  |  |  | "     </div>\n"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | alert(html) | 
|---|
|  |  |  | ttbody.innerHTML = html; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|