From 74943a41d9db8f2f3dd11066a935465859064dfc Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 16 八月 2024 09:38:12 +0800
Subject: [PATCH] 条码档案:动态列

---
 WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
index f78d2f6..5a4a381 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
@@ -599,17 +599,25 @@
                         if (data1.count == 1) {
                             var data = [];//鍒楀瓧娈垫暟鎹�
                             var col = [];
-                         
+
+                            var totalArray = [];
+
                             //缁欑┖鐨勬暟缁勮祴鍊�
                             for (var key in data1.list) {//寰簭閬嶅巻鏁扮粍
                                 data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//浠庢瘡涓璞′腑鎻愬彇鏁版嵁
                             }
+
+                            //鍒ゆ柇鏄惁鏄函鑻辨枃
+                            var patrn = new RegExp("[\u4E00-\u9FA5]+");
                             //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
                             col.push({ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣' });
                             for (var i = 0; i < data.length; i++) {//閬嶅巻data鏁扮粍閲嶇殑鏁版嵁
                                 // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                 if ($.inArray(data[i].name, titleData) > -1) {//妫�鏌ata銆恑銆�.name鏄惁鍦ㄦ暟缁勪腑  //璁$畻鍒�
                                     col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else if (!patrn.test(data[i].name)) {
+                                    col.push({ field: data[i].name, title: data[i].name, hide: true }); //闅愯棌鍒�
                                 }
                                 else if ($.inArray(data[i].name, totalArray) > -1) { //璁$畻鍒�  
                                     col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
@@ -624,7 +632,8 @@
                                     }
                                 }
                             }
-                        
+
+                            option.cols = [col];
                             option.data = data1.data;
                             ins = table.render(option);
                             layer.close(index);

--
Gitblit v1.9.1