From 22c6b50e5f65969240835abed3c6ab6ede4b203d Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期四, 11 八月 2022 19:47:12 +0800
Subject: [PATCH] 隐藏列增加列宽设置
---
WebTM/views/基础资料/隐藏列设置/Gy_GridView_Hide.html | 5 +++--
WebTM/views/生产管理/要料计划/JIT_NeedMaterPlanBillEdit.html | 14 +++++++++-----
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\232\220\350\227\217\345\210\227\350\256\276\347\275\256/Gy_GridView_Hide.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\232\220\350\227\217\345\210\227\350\256\276\347\275\256/Gy_GridView_Hide.html"
index 35571fe..f9082f6 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\232\220\350\227\217\345\210\227\350\256\276\347\275\256/Gy_GridView_Hide.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\232\220\350\227\217\345\210\227\350\256\276\347\275\256/Gy_GridView_Hide.html"
@@ -233,7 +233,7 @@
//琛ㄦ牸鐨勬暟鎹~鍏�
for (var i = 0; i < colNames.length; i++) {
var dataCols = dataCol[i].split('|');
- cols.push({ "ColumnName": colNames[i], "IsHide": dataCols[1] == 1 ? true : false, "Alignment": dataCols[2] })
+ cols.push({ "ColumnName": colNames[i], "IsHide": dataCols[1] == 1 ? true : false, "Alignment": dataCols[2], "ColumnWidth": dataCols[3] })
}
option.data = cols;
table.render(option);
@@ -252,7 +252,7 @@
} else {
//榛樿涓嶉�変腑 鏄剧ず瀛椾綋灞呭乏 琛ㄦ牸鐨勬暟鎹~鍏�
for (var i = 0; i < colNames.length; i++) {
- cols.push({ "ColumnName": colNames[i], "IsHide": false, "Alignment": "L" })
+ cols.push({ "ColumnName": colNames[i], "IsHide": false, "Alignment": "L", "ColumnWidth": 120 })
}
option.data = cols;
table.render(option);
@@ -285,6 +285,7 @@
{ field: 'ColumnName', title: '鍒楀悕', width: 100 }
, { file: 'IsHide', title: '鏄惁闅愯棌', width: 100, templet: '#IsHide' }
, { field: 'Alignment', title: '瀵归綈鏂瑰紡', width: 100, templet: '#Alignment' }
+ , { field: 'ColumnWidth', title: '鍒楀', width: 100, templet: '#ColumnWidth', edit: 'text' }
]]
};
}
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html"
index b38446b..47fc965 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\350\246\201\346\226\231\350\256\241\345\210\222/JIT_NeedMaterPlanBillEdit.html"
@@ -887,6 +887,10 @@
if (dataCols[1] == 1) {
option.cols[0][i + 1]["hide"] = true;
}
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
//璁剧疆鍐呭瀛椾綋澶у皬
if (data1.data[0].HFontSize != 0) {
option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
@@ -894,11 +898,11 @@
option.cols[0][i + 1]["style"] = "font-size:100%";
}
//璁剧疆鍒楀
- if (data1.data[0].HColumnWidth != 0) {
- option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
- } else {
- option.cols[0][i + 1]["width"] = "";
- }
+ //if (data1.data[0].HColumnWidth != 0) {
+ // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
+ //} else {
+ // option.cols[0][i + 1]["width"] = "";
+ //}
//鏄剧ず鍒�
if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
option.cols[0][i + 1]["hide"] = false;
--
Gitblit v1.9.1