Quellcode durchsuchen

包装单一览表=>水距字体加粗水平垂直居中变红色

李士越 vor 1 Jahr
Ursprung
Commit
cf9f5fc697
1 geänderte Dateien mit 24 neuen und 5 gelöschten Zeilen
  1. 24 5
      wwwroot/main/packingform/index.html

+ 24 - 5
wwwroot/main/packingform/index.html

@@ -11,6 +11,15 @@
     <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
     <script src="/Plugins/xrequest/xrequest.min.js"></script>
     <title>东科软件</title>
+    <style>
+        .table tbody .bold-large-text {
+            font-size: 14px;
+            font-weight: bold;
+            text-align: center;
+            color: red;
+            vertical-align: middle;
+        }
+    </style>
 </head>
 <body class="bg-light">
     <!--自动缩放-->
@@ -53,9 +62,8 @@
             <table id="table" class="table table-bordered table-hover" data-toolbar="#toolbar" style="font-size: 14px;">
                 <thead>
                     <tr>
-                        <th scope="col" data-field="线号" data-sortable="true">线号</th>
                         <th scope="col" data-field="出水距" data-sortable="true">水距</th>
-                        <th scope="col" data-field="产品型号" data-sortable="true">产品型号</th> 
+                        <th scope="col" data-field="产品型号" data-sortable="true">产品型号</th>
                         <th scope="col" data-field="商标" data-sortable="true">商标</th>
                         <th scope="col" data-field="商标物料描述" data-sortable="true">物料描述</th>
                         <th scope="col" data-field="商标变更" data-sortable="true">商标变更</th>
@@ -64,6 +72,7 @@
                         <th scope="col" data-field="已出数量" data-sortable="true">已出</th>
                         <th scope="col" data-field="状态" data-sortable="true">状态</th>
                         <th scope="col" data-field="下单时间" data-sortable="true">下单时间</th>
+                        <th scope="col" data-field="线号" data-sortable="true">线号</th>
                     </tr>
                 </thead>
             </table>
@@ -107,7 +116,14 @@
                 pageSize: 10,
                 pageList: "[10, 100, 500, 1000, 2000, 5000, ALL]",
                 striped: true,
-                sidePagination: 'server', 
+                sidePagination: 'server',
+                columns: [
+                    {
+                        field: '出水距', // 列的字段名
+                        title: '水距', // 列的标题
+                        class: 'bold-large-text' // 为该列添加 CSS 类
+                        // 其他列选项...
+                    }],
                 responseHandler: function (res) {
                     return res;
                 },
@@ -148,7 +164,7 @@
                 else if (value.出水距 !== dataValue) {
                     //合并前一个组并且只合并数量大于1的组
                     if (rowspan > 1) {
-                        $('#table').bootstrapTable('mergeCells', { index: startIndex, field: '出水距', rowspan: rowspan })
+                        $('#table').bootstrapTable('mergeCells', { index: startIndex, field: '出水距', rowspan: rowspan }) 
                     }
                     // 更新状态
                     dataValue = value.出水距;
@@ -165,8 +181,11 @@
             if (dataValue !== null && rowspan > 1) {
                 $('#table').bootstrapTable('mergeCells', { index: startIndex, field: '出水距', rowspan: rowspan })
             }
+             
+        }
+        function nameFormatter(value, row, index) { 
+            return '<span class="bold-large-text">' + value + '</span>'; 
         }
- 
     </script>
 
 </body>