From 6b3eeeb69a30c971ec7ba7afb860cd142eac611a Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 12 十月 2023 16:30:45 +0800
Subject: [PATCH] 工程项目任务汇报模块复选框刷新优化
---
WebTM/layuiadmin/Scripts/webConfig.js | 4 ++--
WebTM/views/项目管理/工作任务/PM_WorkTaskReportBill.html | 32 +++++++++++++++++++++++---------
2 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 8d1e7a1..a9e22eb 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -3,10 +3,10 @@
//var WEBURL = "http://192.168.16.80:8011/"; //鍔炲叕瀹ゆ湇鍔″櫒
//var WEBURL = "http://localhost:8081/SWEAPI/"; //ch鏈湴*/
//var WEBURL = "http://61.164.86.218:8099/ABAPI/";
- //var WEBURL = "http://localhost/API/"; //棰滄檽鍐涙湰鍦伴厤缃�
+ var WEBURL = "http://localhost/API/"; //棰滄檽鍐涙湰鍦伴厤缃�
//var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄤ箰鏈湴閰嶇疆
//var WEBURL = "http://localhost:8082/API/"; //鏉滆春鏈湴閰嶇疆
- var WEBURL = "http://localhost:81/API/"; //闄堥洴闈欐湰鍦伴厤缃�
+ //var WEBURL = "http://localhost:81/API/"; //闄堥洴闈欐湰鍦伴厤缃�
//var WEBURL = "http://localhost:8082/LuBaoAPI/"; //浣欐�濇澃鏈湴閰嶇疆
//var WEBURL = "http://localhost:8088/ARAPI/"; //浣欐�濇澃鏈湴閰嶇疆(瀹夌憺)
//var WEBURL = "http://10.1.4.155/API/"; //姹熶赴瀹㈡埛NEW
diff --git "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html" "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html"
index 7cb1354..4237953 100644
--- "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html"
+++ "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskReportBill.html"
@@ -326,7 +326,6 @@
$("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
//鍒濆鍖栭」鐩樁娈佃〃
get_InitGrid();
- DisPlay_HideColumn();
}
//else if (OperationType == 2) { //澶嶅埗
// //绂佺敤缁勭粐閫夐」
@@ -349,7 +348,6 @@
//$("#HOrgID").attr("disabled", true);
//鍒濆鍖栭」鐩樁娈佃〃
get_InitGrid();
- DisPlay_HideColumn();
RoadBillMain(linterid);
} else if (OperationType == 4) { //涓嬫帹
//绂佺敤缁勭粐閫夐」
@@ -469,6 +467,7 @@
table.cache["mainTable"].push(NewRow);
option.data = table.cache["mainTable"];
table.render(option);
+ CheckedSet_tableSub();
for (var i = 1; i <= option.data.length; i++) {
//瀹屾垚鏍囪
@@ -493,6 +492,7 @@
table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+ CheckedSet_tableSub();
for (var i = 1; i <= option.data.length; i++) {
//瀹屾垚鏍囪
@@ -700,6 +700,7 @@
];
option.data = rowdata;
table.render(option);
+ CheckedSet_tableSub();
}
//#endregion
@@ -845,13 +846,7 @@
}
option.data = tableSub;
table.render(option);
-
- for (var i = 0; i < tableSub.length; i++) {
- if (tableSub[i].HFinishFlag) {
- $('#HFinishFlag' + (i + 1)).attr("checked", true);
- }
- }
- form.render('checkbox');
+ CheckedSet_tableSub();
form.render('select');
}
})
@@ -888,6 +883,7 @@
option.data = dataArray;
table.render(option);
+ CheckedSet_tableSub();
//$.ajax({
@@ -1110,6 +1106,7 @@
option.data[i - 1] = data[0];
option.data[i] = tables[0];
table.render(option);
+ CheckedSet_tableSub();
break;
}
}
@@ -1132,6 +1129,7 @@
option.data[i + 1] = data[0];
option.data[i] = tables[0];
table.render(option);
+ CheckedSet_tableSub();
break;
}
}
@@ -1153,6 +1151,7 @@
oldData.splice(obj.tr.data('index'), 1)
option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
table.render(option);
+ CheckedSet_tableSub();
layer.close(index);
}
});
@@ -1385,8 +1384,10 @@
}
}
table.render(option);
+ CheckedSet_tableSub();
} else {
table.render(option);
+ CheckedSet_tableSub();
}
}, error: function () {
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -1395,6 +1396,19 @@
}
//#endregion
+ //#region 鍒锋柊璁剧疆澶嶉�夋鐘舵��
+ function CheckedSet_tableSub() {
+ var tableSub = option.data;
+ //瀵瑰瓙琛ㄤ腑鐨勫閫夋杩涜閫変腑
+ for (var i = 0; i < tableSub.length; i++) {
+ if (tableSub[i].HFinishFlag) {
+ $('#HFinishFlag' + (i + 1)).attr("checked", true);
+ }
+ }
+ form.render('checkbox');
+ }
+ //#endregion
+
//#region 鏍规嵁鐧诲綍璐︽埛鑾峰彇鐩稿簲鑱屽憳
function getHEmpByHUserName() {
var Czybm = sessionStorage["Czybm"];
--
Gitblit v1.9.1