From e23059c4489528de6d54d301da7fef60c066dc72 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 21 十一月 2024 09:12:30 +0800
Subject: [PATCH] 分布式调出单:编辑页面 列设置 功能完善
---
WebTM/views/领料发货/分步式调出单/Fb_StepFoldOutBillEdit.html | 151 +++++++++++++++++++++++++++++++++++++++++++++++++-
WebTM/Properties/PublishProfiles/JFTM.pubxml.user | 2
2 files changed, 148 insertions(+), 5 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 351b8fe..a065968 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -7240,7 +7240,7 @@
<publishTime>09/14/2023 13:59:10</publishTime>
</File>
<File Include="views/棰嗘枡鍙戣揣/鍒嗘寮忚皟鍑哄崟/Fb_StepFoldOutBillEdit.html">
- <publishTime>07/31/2024 13:38:19</publishTime>
+ <publishTime>11/21/2024 09:11:35</publishTime>
</File>
<File Include="views/棰嗘枡鍙戣揣/鍒嗘寮忚皟鍑哄崟/Fb_StepFoldOutBillList.html">
<publishTime>09/13/2024 15:42:13</publishTime>
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\210\206\346\255\245\345\274\217\350\260\203\345\207\272\345\215\225/Fb_StepFoldOutBillEdit.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\210\206\346\255\245\345\274\217\350\260\203\345\207\272\345\215\225/Fb_StepFoldOutBillEdit.html"
index 79d6a56..7835bbc 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\210\206\346\255\245\345\274\217\350\260\203\345\207\272\345\215\225/Fb_StepFoldOutBillEdit.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\210\206\346\255\245\345\274\217\350\260\203\345\207\272\345\215\225/Fb_StepFoldOutBillEdit.html"
@@ -298,6 +298,11 @@
var year = date.getFullYear();
var shijian = year + "-" + month + "-" + day;
var allVal;
+
+ //妯″潡鍚�
+ var HModName = "Fb_StepFoldinBillEdit";
+ var titleData = [];
+
//鍙屽嚮杩斿洖鍏ㄥ眬鍙橀噺
window.OptionData = [];
//#endregion
@@ -368,6 +373,7 @@
// 鍒濆鍖栫晫
set_InitGrid();
+ DisPlay_HideColumn();
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
@@ -412,10 +418,10 @@
//checkRefresh();
}
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -545,6 +551,143 @@
}
}
//#endregion
+
+ //#region 瀛愯〃1锛氶殣钘忓垪璁剧疆
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["title"] + ",";
+ }
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [contentUrl, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //#endregion
+ //#region 瀛愯〃1锛氭樉绀哄垪鏁版嵁
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ async: false,
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ async: false,
+ success: function (data1) {
+ if (data1.data.length != 0) {
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ /*var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID","璁㈠崟绛夌骇浠g爜","閿�鍞嚭搴撴暟閲�","閿�鍞嚭搴撳鏍告暟閲�","閿�鍞嚭搴撳鏍搁噾棰�","鐢熶骇鏁伴噺","閿�鍞��搴撴暟閲�","閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
+ //titleData = [];
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ if (i >= dataCol.length) {
+ continue;
+ }
+
+ 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 (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;
+ }
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) > -1) {
+ option.cols[0][i + 1]["hide"] = 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];
+ }
+ }
+
+ //鍙栨秷鍐荤粨鍒�
+ 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);
+
+
+ } else {
+ table.render(option);
+
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
+
//#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
function get_LoginIs() {
if (sessionStorage.login != "login") {
--
Gitblit v1.9.1