From 9c15dbd16fdf1114921335adb28dce3d32da35bc Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期四, 17 十月 2024 10:08:42 +0800
Subject: [PATCH] 列设置添加
---
WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesBillList.html | 225 +++++++++++++-----
WebTM/views/工资管理/异常工时申请单/Pay_ErrWorkTimesRequestBillList.html | 225 +++++++++++++-----
WebTM/views/工资管理/定额申请/Pay_ProcPriceRequestBillList.html | 227 +++++++++++++-----
3 files changed, 494 insertions(+), 183 deletions(-)
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html"
index 2ea3fde..08ebdaa 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\256\232\351\242\235\347\224\263\350\257\267/Pay_ProcPriceRequestBillList.html"
@@ -308,88 +308,193 @@
//#endregion
//#region 鏄剧ず鍒楁暟鎹�
+ //function DisPlay_HideColumn() {
+ // $.ajax({
+ // type: "GET",
+ // url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ // async: false,
+ // data: { "HModName": HModName, "user": HMaker },
+ // success: function (data1) {
+ // if (data1.data.length != 0) {
+ // var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ // dataCol = data1.data[0].HGridString.split(',');
+
+ // for (var i = 0; i < option.cols[0].length - 2; i++) {
+ // if (dataCol[i]) {
+ // var dataCols = dataCol[i].split('|');
+ // }
+ // //闅愯棌鍒�
+ // 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;";
+ // } else {
+ // option.cols[0][i + 1]["style"] = "font-size:100%";
+ // }
+ // //鏄剧ず鍒�
+ // if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ // option.cols[0][i + 1]["hide"] = false;
+ // }
+ // //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ // switch (dataCols[2]) {
+ // case "L":
+ // option.cols[0][i + 1]["align"] = "left";
+ // break;
+ // case "M":
+ // option.cols[0][i + 1]["align"] = "center";
+ // break;
+ // case "R":
+ // option.cols[0][i + 1]["align"] = "right";
+ // break;
+ // }
+ // }
+
+ // //鍙栨秷鍐荤粨鍒�
+ // for (var i = 1; i < option.cols[0].length - 1; i++) {
+ // if (option.cols[0][i]["fixed"] != null) {
+ // option.cols[0][i]["fixed"] = null;
+ // }
+ // else {
+ // break;
+ // }
+ // }
+ // //鍐荤粨鍒�
+ // if (data1.data[0].HFixCols != 0) {
+ // for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ // if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ // data1.data[0].HFixCols += 1;
+ // }
+ // option.cols[0][i + 1]["fixed"] = "left";
+ // }
+ // }
+ // table.render(option);
+ // ins = table.render(option);
+ // } else {
+ // table.render(option);
+ // ins = table.render(option);
+ // }
+
+ // //鍒锋柊鎸夐挳鏄剧ず
+ // var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ // Display_HideButton(btns, HBillType, HModName, HMaker);
+
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // })
+ //}
+ //#endregion
+
+
+ //#region 鏄剧ず鍒楁暟鎹�
function DisPlay_HideColumn() {
$.ajax({
- type: "GET",
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
async: false,
- data: { "HModName": HModName, "user": HMaker },
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.data.length != 0) {
+
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
dataCol = data1.data[0].HGridString.split(',');
-
- for (var i = 0; i < option.cols[0].length - 2; i++) {
- if (dataCol[i]) {
- var dataCols = dataCol[i].split('|');
- }
- //闅愯棌鍒�
- 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;";
- } else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
- }
- //鏄剧ず鍒�
- if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
- option.cols[0][i + 1]["hide"] = false;
- }
- //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
- switch (dataCols[2]) {
- case "L":
- option.cols[0][i + 1]["align"] = "left";
- break;
- case "M":
- option.cols[0][i + 1]["align"] = "center";
- break;
- case "R":
- option.cols[0][i + 1]["align"] = "right";
- break;
- }
- }
-
- //鍙栨秷鍐荤粨鍒�
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- if (option.cols[0][i]["fixed"] != null) {
- option.cols[0][i]["fixed"] = null;
- }
- else {
- break;
- }
- }
- //鍐荤粨鍒�
- if (data1.data[0].HFixCols != 0) {
- for (var i = 0; i < data1.data[0].HFixCols; i++) {
- if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
- data1.data[0].HFixCols += 1;
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ 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;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
}
- option.cols[0][i + 1]["fixed"] = "left";
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
}
}
table.render(option);
- ins = table.render(option);
+
} else {
table.render(option);
- ins = table.render(option);
+
}
-
//鍒锋柊鎸夐挳鏄剧ず
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
Display_HideButton(btns, HBillType, HModName, HMaker);
-
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
})
}
//#endregion
+
//#endregion
@@ -865,7 +970,7 @@
var colName = "";
var contentUrl = "";
for (var i = 1; i < option.cols[0].length; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -874,7 +979,7 @@
}
colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
- contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
layer.open({
type: 2
@@ -1178,7 +1283,7 @@
var Organization = '<option value="0" selected="selected" ></option>';
for (var i = 1; i < option.cols[0].length; i++) {
if (option.cols[0][i].hide != true) {
- Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
}
}
$("#ColName").empty();
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html"
index 41380fd..70b76f6 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\345\274\202\345\270\270\345\267\245\346\227\266\347\224\263\350\257\267\345\215\225/Pay_ErrWorkTimesRequestBillList.html"
@@ -303,88 +303,191 @@
//#endregion
//#region 鏄剧ず鍒楁暟鎹�
+ //function DisPlay_HideColumn() {
+ // $.ajax({
+ // type: "GET",
+ // url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ // async: false,
+ // data: { "HModName": HModName, "user": HMaker },
+ // success: function (data1) {
+ // if (data1.data.length != 0) {
+ // var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ // dataCol = data1.data[0].HGridString.split(',');
+
+ // for (var i = 0; i < option.cols[0].length - 2; i++) {
+ // if (dataCol[i]) {
+ // var dataCols = dataCol[i].split('|');
+ // }
+ // //闅愯棌鍒�
+ // 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;";
+ // } else {
+ // option.cols[0][i + 1]["style"] = "font-size:100%";
+ // }
+ // //鏄剧ず鍒�
+ // if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ // option.cols[0][i + 1]["hide"] = false;
+ // }
+ // //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ // switch (dataCols[2]) {
+ // case "L":
+ // option.cols[0][i + 1]["align"] = "left";
+ // break;
+ // case "M":
+ // option.cols[0][i + 1]["align"] = "center";
+ // break;
+ // case "R":
+ // option.cols[0][i + 1]["align"] = "right";
+ // break;
+ // }
+ // }
+
+ // //鍙栨秷鍐荤粨鍒�
+ // for (var i = 1; i < option.cols[0].length - 1; i++) {
+ // if (option.cols[0][i]["fixed"] != null) {
+ // option.cols[0][i]["fixed"] = null;
+ // }
+ // else {
+ // break;
+ // }
+ // }
+ // //鍐荤粨鍒�
+ // if (data1.data[0].HFixCols != 0) {
+ // for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ // if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ // data1.data[0].HFixCols += 1;
+ // }
+ // option.cols[0][i + 1]["fixed"] = "left";
+ // }
+ // }
+ // table.render(option);
+ // ins = table.render(option);
+ // } else {
+ // table.render(option);
+ // ins = table.render(option);
+ // }
+
+ // //鍒锋柊鎸夐挳鏄剧ず
+ // var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ // Display_HideButton(btns, HBillType, HModName, HMaker);
+
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // })
+ //}
+ //#endregion
+
+ //#region 鏄剧ず鍒楁暟鎹�
function DisPlay_HideColumn() {
$.ajax({
- type: "GET",
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
async: false,
- data: { "HModName": HModName, "user": HMaker },
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.data.length != 0) {
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
dataCol = data1.data[0].HGridString.split(',');
-
- for (var i = 0; i < option.cols[0].length - 2; i++) {
- if (dataCol[i]) {
- var dataCols = dataCol[i].split('|');
- }
- //闅愯棌鍒�
- 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;";
- } else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
- }
- //鏄剧ず鍒�
- if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
- option.cols[0][i + 1]["hide"] = false;
- }
- //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
- switch (dataCols[2]) {
- case "L":
- option.cols[0][i + 1]["align"] = "left";
- break;
- case "M":
- option.cols[0][i + 1]["align"] = "center";
- break;
- case "R":
- option.cols[0][i + 1]["align"] = "right";
- break;
- }
- }
-
- //鍙栨秷鍐荤粨鍒�
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- if (option.cols[0][i]["fixed"] != null) {
- option.cols[0][i]["fixed"] = null;
- }
- else {
- break;
- }
- }
- //鍐荤粨鍒�
- if (data1.data[0].HFixCols != 0) {
- for (var i = 0; i < data1.data[0].HFixCols; i++) {
- if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
- data1.data[0].HFixCols += 1;
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ 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;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
}
- option.cols[0][i + 1]["fixed"] = "left";
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
}
}
table.render(option);
- ins = table.render(option);
+
} else {
table.render(option);
- ins = table.render(option);
+
}
-
//鍒锋柊鎸夐挳鏄剧ず
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
Display_HideButton(btns, HBillType, HModName, HMaker);
-
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
})
}
//#endregion
+
//#endregion
@@ -701,7 +804,7 @@
var colName = "";
var contentUrl = "";
for (var i = 1; i < option.cols[0].length; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -710,7 +813,7 @@
}
colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
- contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
layer.open({
type: 2
@@ -1014,7 +1117,7 @@
var Organization = '<option value="0" selected="selected" ></option>';
for (var i = 1; i < option.cols[0].length; i++) {
if (option.cols[0][i].hide != true) {
- Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
}
}
$("#ColName").empty();
diff --git "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html" "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html"
index c639ea8..fd714c3 100644
--- "a/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html"
+++ "b/WebTM/views/\345\267\245\350\265\204\347\256\241\347\220\206/\350\200\203\345\213\244\346\261\207\346\212\245\345\215\225/Pay_WorkTimesBillList.html"
@@ -306,86 +306,189 @@
//#region 鏄剧ず鍒楁暟鎹�
function DisPlay_HideColumn() {
$.ajax({
- type: "GET",
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
async: false,
- data: { "HModName": HModName, "user": HMaker },
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.data.length != 0) {
+
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
dataCol = data1.data[0].HGridString.split(',');
-
- for (var i = 0; i < option.cols[0].length - 2; i++) {
- if (dataCol[i]) {
- var dataCols = dataCol[i].split('|');
- }
- //闅愯棌鍒�
- 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;";
- } else {
- option.cols[0][i + 1]["style"] = "font-size:100%";
- }
- //鏄剧ず鍒�
- if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
- option.cols[0][i + 1]["hide"] = false;
- }
- //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
- switch (dataCols[2]) {
- case "L":
- option.cols[0][i + 1]["align"] = "left";
- break;
- case "M":
- option.cols[0][i + 1]["align"] = "center";
- break;
- case "R":
- option.cols[0][i + 1]["align"] = "right";
- break;
- }
- }
-
- //鍙栨秷鍐荤粨鍒�
- for (var i = 1; i < option.cols[0].length - 1; i++) {
- if (option.cols[0][i]["fixed"] != null) {
- option.cols[0][i]["fixed"] = null;
- }
- else {
- break;
- }
- }
- //鍐荤粨鍒�
- if (data1.data[0].HFixCols != 0) {
- for (var i = 0; i < data1.data[0].HFixCols; i++) {
- if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
- data1.data[0].HFixCols += 1;
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ 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;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
}
- option.cols[0][i + 1]["fixed"] = "left";
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
}
}
table.render(option);
- ins = table.render(option);
+
} else {
table.render(option);
- ins = table.render(option);
+
}
-
//鍒锋柊鎸夐挳鏄剧ず
var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
Display_HideButton(btns, HBillType, HModName, HMaker);
-
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
})
}
//#endregion
+
+ ////#region 鏄剧ず鍒楁暟鎹�
+ //function DisPlay_HideColumn() {
+ // $.ajax({
+ // type: "GET",
+ // url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ // async: false,
+ // data: { "HModName": HModName, "user": HMaker },
+ // success: function (data1) {
+ // if (data1.data.length != 0) {
+ // var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ // dataCol = data1.data[0].HGridString.split(',');
+
+ // for (var i = 0; i < option.cols[0].length - 2; i++) {
+ // if (dataCol[i]) {
+ // var dataCols = dataCol[i].split('|');
+ // }
+ // //闅愯棌鍒�
+ // 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;";
+ // } else {
+ // option.cols[0][i + 1]["style"] = "font-size:100%";
+ // }
+ // //鏄剧ず鍒�
+ // if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ // option.cols[0][i + 1]["hide"] = false;
+ // }
+ // //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ // switch (dataCols[2]) {
+ // case "L":
+ // option.cols[0][i + 1]["align"] = "left";
+ // break;
+ // case "M":
+ // option.cols[0][i + 1]["align"] = "center";
+ // break;
+ // case "R":
+ // option.cols[0][i + 1]["align"] = "right";
+ // break;
+ // }
+ // }
+
+ // //鍙栨秷鍐荤粨鍒�
+ // for (var i = 1; i < option.cols[0].length - 1; i++) {
+ // if (option.cols[0][i]["fixed"] != null) {
+ // option.cols[0][i]["fixed"] = null;
+ // }
+ // else {
+ // break;
+ // }
+ // }
+ // //鍐荤粨鍒�
+ // if (data1.data[0].HFixCols != 0) {
+ // for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ // if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ // data1.data[0].HFixCols += 1;
+ // }
+ // option.cols[0][i + 1]["fixed"] = "left";
+ // }
+ // }
+ // table.render(option);
+ // ins = table.render(option);
+ // } else {
+ // table.render(option);
+ // ins = table.render(option);
+ // }
+
+ // //鍒锋柊鎸夐挳鏄剧ず
+ // var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
+ // Display_HideButton(btns, HBillType, HModName, HMaker);
+
+ // }, error: function () {
+ // layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ // }
+ // })
+ //}
+ ////#endregion
//#endregion
@@ -724,7 +827,7 @@
var colName = "";
var contentUrl = "";
for (var i = 1; i < option.cols[0].length; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -733,7 +836,7 @@
}
colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
- contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
layer.open({
type: 2
@@ -1039,7 +1142,7 @@
var Organization = '<option value="0" selected="selected" ></option>';
for (var i = 1; i < option.cols[0].length; i++) {
if (option.cols[0][i].hide != true) {
- Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
}
}
$("#ColName").empty();
--
Gitblit v1.9.1