From ba4688fd4f54578dcea7fd1a95092040eb5713c5 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 23 八月 2024 15:09:01 +0800
Subject: [PATCH] 编辑列设置
---
WebTM/views/采购管理/其他应付单/YF_PayMentOtherBillMain.html | 119 +++++
WebTM/views/采购管理/收料通知单/Add_Edit_Cg_POInStockBillList.html | 120 +++++
WebTM/Properties/PublishProfiles/JFTM.pubxml.user | 12
WebTM/views/采购管理/采购合同/Add_Edit_Cg_ContractBillList.html | 237 ++++++++++
WebTM/views/采购管理/退料通知单/Add_Edit_Cg_POInStockBackBillList.html | 125 +++++
WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html | 124 +++++
WebTM/views/采购管理/采购申请单/Cg_PORequestBill.html | 122 +++++
WebTM/views/采购管理/报价单/Sup_QuotePriceBillEdit.html | 120 +++++
WebTM/views/采购管理/应付单/Cg_PayableBill.html | 8
WebTM/views/采购管理/付款单/YF_PayMentBill.html | 25
WebTM/views/采购管理/采购订单/Cg_POOrderBillEdit.html | 121 +++++
WebTM/views/采购管理/询价单/Sup_AskPriceBillEdit.html | 12
WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html | 125 +++++
13 files changed, 1,194 insertions(+), 76 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 65b3430..f53810d 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -6423,10 +6423,10 @@
<publishTime>07/10/2024 16:06:15</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/浠樻鍗�/YF_PayMentBill.html">
- <publishTime>08/15/2024 16:30:17</publishTime>
+ <publishTime>08/23/2024 10:22:54</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/浠樻鍗�/YF_PayMentBillList.html">
- <publishTime>08/22/2024 10:14:42</publishTime>
+ <publishTime>08/23/2024 09:12:12</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/鍏朵粬搴斾粯鍗�/YF_PayMentOtherBillMain.html">
<publishTime>05/17/2024 08:07:20</publishTime>
@@ -6447,7 +6447,7 @@
<publishTime>08/16/2024 10:30:58</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/搴斾粯鍗�/Cg_PayableBillList.html">
- <publishTime>08/22/2024 10:12:52</publishTime>
+ <publishTime>08/23/2024 09:43:25</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/搴斾粯閫�娆惧崟/YF_PayMentBackBill.html">
<publishTime>04/15/2024 13:00:49</publishTime>
@@ -6516,7 +6516,7 @@
<publishTime>08/07/2024 09:10:40</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillEdit.html">
- <publishTime>08/16/2024 10:04:58</publishTime>
+ <publishTime>08/23/2024 13:09:28</publishTime>
</File>
<File Include="views/閲囪喘绠$悊/閲囪喘璁㈠崟/Cg_POOrderBillList.html">
<publishTime>08/22/2024 10:39:35</publishTime>
@@ -6585,7 +6585,7 @@
<publishTime>07/19/2024 08:37:36</publishTime>
</File>
<File Include="views/閿�鍞鐞�/鏀舵鍗�/YS_ReceiveBill.html">
- <publishTime>08/22/2024 11:59:21</publishTime>
+ <publishTime>08/22/2024 16:29:17</publishTime>
</File>
<File Include="views/閿�鍞鐞�/鏀舵鍗�/YS_ReceiveBillList.html">
<publishTime>08/22/2024 10:00:12</publishTime>
@@ -7092,7 +7092,7 @@
<publishTime>03/07/2024 09:59:11</publishTime>
</File>
<File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Add_Edit_Kf_POStockInBillList.html">
- <publishTime>08/16/2024 10:15:40</publishTime>
+ <publishTime>08/22/2024 15:00:23</publishTime>
</File>
<File Include="views/楠屾敹鍏ュ簱/澶栬喘鍏ュ簱/Kf_POStockInBackBill.html">
<publishTime>04/15/2024 13:00:49</publishTime>
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html"
index b51e5a8..b5ef21c 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\344\273\230\346\254\276\345\215\225/YF_PayMentBill.html"
@@ -702,7 +702,7 @@
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100 }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100 }
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, style: 'background-color:#efefef4d;'}
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
@@ -747,11 +747,13 @@
//, { field: 'HSeContractInterID', title: '閿�鍞悎鍚屽唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
//, { field: 'HSeContractEntryID', title: '閿�鍞悎鍚屽瓙鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
//, { field: 'HSeContractBillNo', title: '閿�鍞悎鍚屽彿', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ , { field: '鎿嶄綔' ,fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
}
option.data = [];
table.render(option);
+
+ DisPlay_HideColumn();
}
//#endregion
@@ -1534,7 +1536,7 @@
function get_HideColumn() {
var colName = "";
for (var i = 1; i < option.cols[0].length; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
@@ -1563,6 +1565,7 @@
$.ajax({
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
type: "GET",
+ async: false,
data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.data.length != 0) {
@@ -1579,7 +1582,7 @@
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[4]) {
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
//闅愯棌鍒�
if (dataCols[1] == 1) {
option.cols[0][i + 1]["hide"] = true;
@@ -1610,7 +1613,11 @@
option.cols[0][i + 1]["align"] = "right";
break;
}
- newCols[0].push(option.cols[0][i + 1]);
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i+1]);
}
}
}
@@ -1638,16 +1645,8 @@
}
}
table.render(option);
- var HBillType = "1102";
- //鍒锋柊鎸夐挳鏄剧ず
- var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
- Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
} else {
table.render(option);
- var HBillType = "1102";
- //鍒锋柊鎸夐挳鏄剧ず
- var btns = document.getElementsByTagName("button"); //鑾峰彇鏈〉鎵�鏈夋寜閽璞�
- Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html"
index 7dcfd91..e4d94d6 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\344\273\230\345\215\225/YF_PayMentOtherBillMain.html"
@@ -287,6 +287,7 @@
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
</div>
@@ -478,7 +479,10 @@
form.render('select');
}
break;
-
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
//#endregion
@@ -857,7 +861,7 @@
,limit:100
, cols: [[
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
, { field: 'HProjectMoneyID', title: '璐圭敤椤圭洰ID', hide: true, style: 'background-color: #f9f9f9;' }
, { field: 'HPMoneyName', title: '璐圭敤椤圭洰鍚嶇О', edit: 'text', event: "HPMoneyName", style: 'background-color: #f9f9f9;' } //f7
, { field: 'HTypeSub', title: '鍙戠エ绫诲瀷', templet: '#HTypeSub' }
@@ -867,7 +871,7 @@
//, { field: 'HPrice', title: '鍗曚环', edit: 'text', style: 'background-color: #f9f9f9;' }
, { field: 'HSumMoney', title: '鎬婚噾棰�', style: 'background-color: #f9f9f9;' }
, { field: 'HRemark', title: '瀛愯〃澶囨敞', edit: 'text', style: 'background-color: #f9f9f9;' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
}
@@ -884,7 +888,7 @@
];
option.data = rowdata;
table.render(option);
-
+ DisPlay_HideColumn();
}
//#endregion
@@ -1361,7 +1365,114 @@
}
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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
//#endregion
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
index 978fee1..477f137 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
@@ -1025,7 +1025,7 @@
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100 }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100 }
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
@@ -2406,7 +2406,7 @@
var colName = "";
var contentUrl = "";
for (var i = 1; i < option.cols[0].length - 1; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -2489,6 +2489,10 @@
option.cols[0][i + 1]["align"] = "right";
break;
}
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
}
//鍙栨秷鍐荤粨鍒�
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html"
index 794aae0..ae4fc72 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\212\245\344\273\267\345\215\225/Sup_QuotePriceBillEdit.html"
@@ -240,6 +240,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
</form>
@@ -269,7 +270,7 @@
var option;
//#endregion
-
+ HModName = 'Sup_QuotePriceBillEdit'
//#region 杩涘叆椤甸潰鍗冲姞杞�
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -356,6 +357,10 @@
break;
//鍑哄叆搴撹褰曟煡璇�
case 'get_InOutSum': get_InOutSum();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
break;
}
});
@@ -903,6 +908,8 @@
$("#HEndDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//澶辨晥鏃ユ湡
//鍒濆鍖栬〃鏍�
set_InitGrid();
+
+ DisPlay_HideColumn();
}
//鍒濆鍖栬〃鏍�
@@ -910,7 +917,7 @@
//琛ㄥご
columns = [ //琛ㄥご
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', totalRow: true }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', totalRow: true }
, { field: 'HMaterID', title: '鐗╂枡ID', hide: true }
, { field: 'HMaterNumber', title: '鐗╂枡浠g爜', edit: 'text', event: "HMaterID", width: 165 }
, { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 220 }
@@ -931,7 +938,7 @@
, { field: 'HCarryType', title: '杩愯緭鏂瑰紡', edit: 'text', width: 120 }
, { field: 'HAddress', title: '浜よ揣鍦扮偣', edit: 'text', width: 120 }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 65 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo', width: 65 }
];
option = {
id: 'mainTable'
@@ -1151,7 +1158,114 @@
}
})
}
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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
//鎵撳嵃
function get_print(data) {
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
index 7abf806..d17c14b 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
@@ -351,7 +351,7 @@
var allVal;
window.OptionData = [];
//#endregion
-
+ var HModName = "Add_Edit_Cg_POInStockBillList"
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -521,6 +521,10 @@
break;
//鍑哄叆搴撹褰曟煡璇�
case 'get_InOutSum': get_InOutSum();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
break;
}
});
@@ -821,10 +825,10 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true }
- , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+ , { type: 'numbers', field: '搴忓彿',title: '搴忓彿', width: 100, totalRow: true }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
, { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
- , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
@@ -852,6 +856,7 @@
option.data = [];
table.render(option);
+ DisPlay_HideColumn()
}
//#region 鍔犺浇琛ㄥご
@@ -2185,7 +2190,114 @@
}
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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 HSourceBillType() {
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\350\257\242\344\273\267\345\215\225/Sup_AskPriceBillEdit.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\350\257\242\344\273\267\345\215\225/Sup_AskPriceBillEdit.html"
index c1e7e19..4c46b76 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\350\257\242\344\273\267\345\215\225/Sup_AskPriceBillEdit.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\350\257\242\344\273\267\345\215\225/Sup_AskPriceBillEdit.html"
@@ -248,6 +248,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Inventory" id="get_Inventory"><i class="layui-icon layui-icon-form"></i>搴撳瓨鏌ヨ</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_InOutSum" id="get_InOutSum"><i class="layui-icon layui-icon-form"></i>鍑哄叆搴撹褰曟煡璇�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
</div>
</script>
</form>
@@ -277,7 +278,7 @@
var option;
//#endregion
-
+ HModName = 'Sup_AskPriceBillEdit'
//#region 杩涘叆椤甸潰鍗冲姞杞�
//#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
@@ -362,6 +363,10 @@
break;
//鍑哄叆搴撹褰曟煡璇�
case 'get_InOutSum': get_InOutSum();
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
break;
}
});
@@ -665,7 +670,7 @@
//琛ㄥご
columns = [ //琛ㄥご
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', totalRow: true }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', totalRow: true }
, { field: 'HMaterID', title: '鐗╂枡ID', hide: true }
, { field: 'HMaterNumber', title: '鐗╂枡浠g爜', edit: 'text', event: "HMaterID", width: 165 }
, { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 220 }
@@ -679,7 +684,7 @@
, { field: 'HCarryType', title: '杩愯緭鏂瑰紡', edit: 'text', width: 120 }
, { field: 'HAddress', title: '浜よ揣鍦扮偣', edit: 'text', width: 120 }
, { field: 'HRemark', title: '澶囨敞', edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 65 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo', width: 65 }
];
option = {
id: 'mainTable'
@@ -711,6 +716,7 @@
}];
table.render(option);
+ DisPlay_HideColumn();
}
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
index 68bb4a4..5f195e4 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
@@ -330,7 +330,7 @@
var shijian = year + "-" + month + "-" + day;
var allVal;
//#endregion
-
+ var HModName = "Add_Edit_Cg_POInStockBackBillList"
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -480,10 +480,10 @@
//鍑哄叆搴撹褰曟煡璇�
case 'get_InOutSum': get_InOutSum();
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -593,10 +593,10 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true }
- , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+ , { type: 'numbers', field: '搴忓彿',title: '搴忓彿', width: 100, totalRow: true }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
, { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
- , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
@@ -623,6 +623,7 @@
option.data = [];
table.render(option);
+ DisPlay_HideColumn();
}
//#endregion
//#endregion
@@ -1935,6 +1936,114 @@
return HTaxRate;
}
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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 getPushSource_POOrderBillInit(HSourceInterID, HSourceEntryID) {
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
index d78a18c..b02d07b 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\345\220\210\345\220\214/Add_Edit_Cg_ContractBillList.html"
@@ -323,7 +323,8 @@
//璁板綍缁勭粐鐨勫��
var HOrgIDBar = 0;
-
+ var HModName = "Add_Edit_Cg_ContractBillSub1"
+ var HModName2 = "Add_Edit_Cg_ContractBillSub2"
//#region 杩涘叆椤甸潰鍗冲姞杞�
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -448,6 +449,10 @@
case 'get_InOutSum': get_InOutSum();
break;
//鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
+ //鍒楄缃�
//case 'set_hidecolumn':
// get_hidecolumn();
// break;
@@ -487,6 +492,10 @@
//鍒锋柊澶嶉�夋
//checkRefresh();
}
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn2':
+ get_HideColumn2();
break;
//鍒楄缃�
//case 'set_hidecolumn':
@@ -788,7 +797,7 @@
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�', style: 'background-color:#efefef4d;' }
- , { type: 'numbers', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
@@ -802,12 +811,13 @@
, { field: 'HTaxMoney', title: '绋庨', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HlineTotal', title: '浠风◣鍚堣', width: 100, edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
}
option.data = rowdata;
table.render(option);
+ DisPlay_HideColumn();
}
function set_InitGrid2() {
option2 = {
@@ -819,19 +829,20 @@
, loading: false
, cols: [[ //瀛愯〃
{ type: 'checkbox', fixed: 'left', totalRowText: '鍚堣琛�', style: 'background-color:#efefef4d;' }
- , { type: 'numbers', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100, style: 'background-color:#efefef4d;' }
, { field: 'HCurID', title: '璐у竵浠g爜', width: 100, hide: true }
, { field: '璐у竵鍚嶇О', title: '璐у竵鍚嶇О', width: 100, edit: 'text', event: "HCurID" }//f7
, { field: 'HExRate', title: '姹囩巼', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
, { field: 'HMoney', title: '閲戦', width: 100, edit: 'text', totalRow: true }
, { field: 'HDate', title: '鍒拌揣鏃ユ湡', width: 120, event: 'HDate' }
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo2', width: 70 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo2', width: 70 }
]]
}
option2.data = rowdata2;
table.render(option2);
+ DisPlay_HideColumn2();
}
//#endregion
//#region 鍔犺浇琛ㄥご
@@ -1631,7 +1642,223 @@
//#endregion
//#endregion
+ //#region 鍒楄缃�1
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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 鍒楄缃�2
+ //闅愯棌鍒楄缃�
+ function get_HideColumn2() {
+ var colName = "";
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ colName += option2.cols[0][i]["field"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName2 + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn2() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option2.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option2.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option2.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option2.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option2.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option2.cols[0][i + 1]["title"], titleData) == -1) {
+ option2.cols[0][i + 1]["hide"] = false;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option2.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option2.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option2.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option2.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ }
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option2.cols[0].length - 1; i++) {
+ if (option2.cols[0][i]["fixed"] != null) {
+ option2.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(option2.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option2.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ table.render(option2);
+ } else {
+ table.render(option2);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\347\224\263\350\257\267\345\215\225/Cg_PORequestBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\347\224\263\350\257\267\345\215\225/Cg_PORequestBill.html"
index b340de7..b1371f4 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\347\224\263\350\257\267\345\215\225/Cg_PORequestBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\347\224\263\350\257\267\345\215\225/Cg_PORequestBill.html"
@@ -279,7 +279,7 @@
var shijian = year + "-" + month + "-" + day;
var allVal;
//#endregion
-
+ var HModName = "Cg_PORequestBill"
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -382,10 +382,10 @@
//鍑哄叆搴撹褰曟煡璇�
case 'get_InOutSum': get_InOutSum();
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -617,7 +617,7 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100, totalRow: true }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100, totalRow: true }
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
@@ -630,12 +630,13 @@
, { field: 'HDate', title: '寤鸿鍒拌揣鏃ユ湡', width: 120, event: 'HDate' }
, { field: 'HUseSub', title: '鐢宠鐢ㄩ��', width: 120, edit: 'text'}
, { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+ , { fixed: 'right', field: '鎿嶄綔', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
]]
}
option.data = rowdata;
table.render(option);
+ DisPlay_HideColumn();
}
//#region 鍔犺浇琛ㄥご
@@ -1156,7 +1157,114 @@
//#endregion
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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
//浠ヤ笂鏄痩ayui妯″潡
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html"
index 4ceb2df..e0a73fa 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\207\207\350\264\255\350\256\242\345\215\225/Cg_POOrderBillEdit.html"
@@ -371,7 +371,7 @@
//璁板綍缁勭粐鐨勫��
var HOrgIDBar = 0; //澹版槑浜嗕竴涓悕涓� HOrgIDBar 鐨勫彉閲忥紝骞跺皢鍏跺垵濮嬪寲涓� 0
-
+ var HModName = "Cg_POOrderBillEdit"
//#region 杩涘叆椤甸潰鍗冲姞杞�
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -524,10 +524,10 @@
//鍑哄叆搴撹褰曟煡璇�
case 'get_InOutSum': get_InOutSum();
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -986,6 +986,8 @@
option.data = rowdata; //瀛愯〃鐨勫�艰祴鍊肩粰option.data 鍚憃ption瀵硅薄娣诲姞涓�涓猟ata灞炴�э紝骞跺皢鍏惰缃负rowdata
table.render(option);//娓茬晫闈�
+
+ DisPlay_HideColumn();
}
//#region 鍔犺浇琛ㄥご
@@ -1894,6 +1896,115 @@
}
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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
+
//#endregion
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
index 4aa4e77..e0c6851 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
@@ -363,7 +363,7 @@
var allVal;
//#endregion
-
+ var HModName = "Add_Edit_Kf_POStockInBillList"
//#region 杩涘叆椤甸潰鍗冲姞杞�
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
@@ -498,10 +498,10 @@
//checkRefresh();
}
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -970,10 +970,10 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100 }
- , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+ , { type: 'numbers',field: '搴忓彿', title: '搴忓彿', width: 100 }
+ , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
, { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
- , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
@@ -1001,6 +1001,8 @@
option.data = [];
table.render(option);
+ DisPlay_HideColumn();
+
}
//#region 鍔犺浇琛ㄥご
@@ -2369,7 +2371,114 @@
return res;
}
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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 AllowLoadData(data) {
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
index 83eaf94..21a7d07 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
@@ -335,7 +335,7 @@
var allVal;
//#endregion
-
+ var HModName = "Kf_POStockInBackBill_Add_Up"
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -514,10 +514,10 @@
//checkRefresh();
}
break;
- ////鍒楄缃�
- //case 'set_HideColumn':
- // get_HideColumn();
- // break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumn();
+ break;
}
});
@@ -798,10 +798,10 @@
, totalRow: true
, cols: [[ //瀛愯〃
{ type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100}
- , { type: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', width: 100}
+ , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true }//婧愬崟鍙�
, { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }//婧愬崟绫诲瀷
- , { type: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
+ , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 100, hide: true }//婧愬崟涓诲唴鐮�
, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true }//婧愬崟瀛愬唴鐮�
, { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
, { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
@@ -826,6 +826,7 @@
option.data = [];
table.render(option);
+ DisPlay_HideColumn();
}
//#region 鍔犺浇琛ㄥご
@@ -1866,7 +1867,114 @@
}
//#endregion
//#endregion
+ //#region 鍒楄缃�
+ //闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+
+ //鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ async: false,
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var titleData = [];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
+ dataCol = data1.data[0].HGridString.split(',');
+
+ for (var i = 0; i < option.cols[0].length - 2; i++) {
+ var dataCols = dataCol[i].split('|');
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ 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[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //鏄剧ず鍒�
+ 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;
+ }
+ //璁剧疆琛ㄦ牸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
//浠ヤ笂鏄痩ayui妯″潡
});
--
Gitblit v1.9.1