From 06b28d1e1043ed7100037f01a9fa34ec499b5026 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 21 十一月 2024 09:08:50 +0800
Subject: [PATCH] 分布式调入单:编辑页面 列设置 功能完善
---
WebTM/views/仓存管理/仓库调拨/Add_Edit_Kf_MoveStockBill.html | 4 +
WebTM/Properties/PublishProfiles/JFTM.pubxml.user | 6 +-
WebTM/views/仓存管理/分步式调入单/Fb_StepFoldinBillEdit.html | 152 +++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 155 insertions(+), 7 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 3c98a36..351b8fe 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -2221,10 +2221,10 @@
<publishTime>07/31/2024 13:38:19</publishTime>
</File>
<File Include="views/浠撳瓨绠$悊/浠撳簱璋冩嫧/Add_Edit_Kf_MoveStockBill.html">
- <publishTime>11/21/2024 08:53:44</publishTime>
+ <publishTime>11/21/2024 09:07:08</publishTime>
</File>
<File Include="views/浠撳瓨绠$悊/浠撳簱璋冩嫧/Add_Edit_Kf_MoveStockBill.html">
- <publishTime>11/21/2024 08:53:44</publishTime>
+ <publishTime>11/21/2024 09:07:08</publishTime>
</File>
<File Include="views/浠撳瓨绠$悊/浠撳簱璋冩嫧/Cc_LookingForBill.html">
<publishTime>04/11/2023 16:34:43</publishTime>
@@ -2275,7 +2275,7 @@
<publishTime>04/11/2023 16:34:43</publishTime>
</File>
<File Include="views/浠撳瓨绠$悊/鍒嗘寮忚皟鍏ュ崟/Fb_StepFoldinBillEdit.html">
- <publishTime>07/31/2024 13:38:19</publishTime>
+ <publishTime>11/21/2024 09:07:28</publishTime>
</File>
<File Include="views/浠撳瓨绠$悊/鍒嗘寮忚皟鍏ュ崟/Fb_StepFoldinBillList.html">
<publishTime>07/31/2024 13:38:19</publishTime>
diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html"
index 63dc9c5..70065fb 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html"
@@ -1871,6 +1871,10 @@
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) {
diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html"
index 702f0b4..7aabad4 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html"
@@ -312,6 +312,11 @@
var year = date.getFullYear();
var shijian = year + "-" + month + "-" + day;
var allVal;
+
+ //妯″潡鍚�
+ var HModName = "Fb_StepFoldinBillEdit";
+ var titleData = [];
+
//鍙屽嚮杩斿洖鍏ㄥ眬鍙橀噺
window.OptionData = [];
//#endregion
@@ -362,6 +367,9 @@
// 鍒濆鍖栫晫
set_InitGrid();
+ DisPlay_HideColumn();
+
+
//鑾峰彇婧愬崟绫诲瀷
HSourceBillType();
//澶村伐鍏锋爮浜嬩欢
@@ -407,10 +415,10 @@
//checkRefresh();
}
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -536,6 +544,142 @@
}
}
//#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 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
//#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
--
Gitblit v1.9.1