浏览代码

报销申请管理-报销调整

huangguoce 1 周之前
父节点
当前提交
69e2bfe475

+ 1 - 3
src/main/webapp/WEB-INF/tags/sys/treeselectAccessoryNoParent.tag

@@ -104,11 +104,9 @@
 											top.layer.close(tempIndex);
 											// 获取所有 td
 											var tds = $('#workAccountList .op-td');
-											for (var i = tds.length - 1; i > 0; i--) {  // 注意 i > 0,从倒数第二个开始
+											for (var i = tds.length - 1; i > 0; i--) {
 												var td = tds.eq(i);
-												// 找到 td 内 class="op-btn-delete" 的元素
 												var deleteBtn = td.find('.op-btn-delete');
-												// 触发 onclick
 												deleteBtn.each(function() {
 													if (this.onclick) {
 														this.onclick();

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllFormAdd.jsp

@@ -228,8 +228,8 @@
                             var serialNumber = index + 1
 
                             if (flag) {
-                                const trId = 'workAccountList' + index;
                                 index = index+1
+                                const trId = 'workAccountList' + index;
                                 $("#workAccountList").append("<tr id='workAccountList" + index + "' class='rowSize'>" +
                                     "<td class='hide'>" +
                                     "<input id='workAccountList" + index + "_id' name='workAccountList[" + index + "].id' type='hidden' value='" + obj.id + "'/>" +

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/treeForm/all/workReimbursementAllModifyApply.jsp

@@ -231,8 +231,8 @@
                             var serialNumber = index + 1
 
                             if(flag) {
-                                const trId = 'workAccountList' + index;
                                 index = index + 1
+                                const trId = 'workAccountList' + index;
                                 $("#workAccountList").append("<tr id='workAccountList" + index + "' class='rowSize'>" +
                                     "<td class='hide'>" +
                                     "<input id='workAccountList" + index + "_id' name='workAccountList[" + index + "].id' type='hidden' value='" + obj.id + "'/>" +

+ 4 - 3
src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewFormAdd.jsp

@@ -183,7 +183,7 @@
 
                             // 3. 替换模板中的所有占位符(关键步骤)
                             var parsedTagHtml = templateHtml
-                                .replace(/__INDEX__/g, index) // 替换索引占位符
+                                .replace(/__INDEX__/g, index+1) // 替换索引占位符
                                 .replace(/__LEADER_IDS__/g, leaderIds) // 替换leaderIds
                                 .replace(/__REIMBURSEMENT_NAME__/g, reimbursementName); // 替换报销人名称
 
@@ -232,8 +232,8 @@
                             var serialNumber = index + 1
 
                             if(flag) {
-                                const trId = 'workAccountList' + index;
                                 index = index+1
+                                const trId = 'workAccountList' + index;
                                 $("#workAccountList").append("<tr id='workAccountList" + index + "' class='rowSize'>" +
                                     "<td class='hide'>" +
                                     "<input id='workAccountList" + index + "_id' name='workAccountList[" + index + "].id' type='hidden' value='" + obj.id + "'/>" +
@@ -354,6 +354,7 @@
                                 var $targetTd = $tr.find('td:eq(1)');
                                 // 3. 触发td的click事件(如果找到该td)
                                 if ($targetTd.length > 0) {
+
                                     $targetTd.trigger('click');
                                 }
                             }
@@ -2257,7 +2258,7 @@
         function setParentInfo(parentId){
             return ;
         }
-        function setPids(pIds,id){
+        function (pIds,id){
             $.ajax({
                 url:"${ctx}/reimbursementType/reimbursementType/projectCharge",
                 dataType:"json",

+ 1 - 1
src/main/webapp/webpage/modules/workreimbursement/treeForm/new/workReimbursementNewModifyApply.jsp

@@ -228,8 +228,8 @@
                             var serialNumber = index + 1
 
                             if (flag) {
-                                const trId = 'workAccountList' + index;
                                 index = index + 1
+                                const trId = 'workAccountList' + index;
 
                                 $("#workAccountList").append("<tr id='workAccountList" + index + "' class='rowSize'>" +
                                     "<td class='hide'>" +