From 6e54db0de1b41ca840e42e11b39a300dba7ceaba Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 17 十一月 2023 12:51:47 +0800
Subject: [PATCH] ../../销售管理/收款单/YS_ReceiveBill.html:增加 结算方式返回方法

---
 WebTM/views/项目管理/工作任务/PM_WorkTaskReportBill.html |   42 ++++++++++++++++++++++++++++++------------
 1 files changed, 30 insertions(+), 12 deletions(-)

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..1e879d6 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({
@@ -1069,7 +1065,11 @@
                         if (HRelTimes.substring(HRelTimes.length - 1, HRelTimes.length) == ".") {
                             layer.msg("绗�" + (i + 1) + "琛岋細鑰楃敤宸ユ椂鏈熬涓嶈兘涓�.锛�");
                             return;
-                        } else {
+                        } else if (HRelTimes == "0") {
+                            layer.msg("绗�" + (i + 1) + "琛岋細鑰楃敤宸ユ椂涓嶈兘涓�0锛�");
+                            return;
+                        }
+                        else {
                             var ref = /^[0-9]+\.?[0-9]*$/;
                             if (!ref.test(HRelTimes)) {
                                 layer.msg("绗�" + (i + 1) + "琛岋細鑰楃敤宸ユ椂璇疯緭姝g‘鍏ユ暟瀛楋紒");
@@ -1083,9 +1083,9 @@
                 //#region 瀛愯〃鍏抽敭瀛楁閲嶅妫�楠�
                 var num = [];
                 for (var i = 0; i < option.data.length; i++) {
-                    temp = option.data[i]["HProjectID"] + "|" + option.data[i]["HProjectStageID"] + "|" + option.data[i]["HName"];
+                    temp = option.data[i]["HProjectID"] + "|" + option.data[i]["HProjectStageID"] + "|" + option.data[i]["HName"] + "|" + option.data[i]["HSourceInterID"] + "|" + option.data[i]["HSourceEntryID"];
                     if ($.inArray(temp, num) != -1) {
-                        layer.msg("绗�" + (i + 1) + "琛岋細椤圭洰浠g爜銆侀」鐩樁娈点�佷换鍔″悕绉伴噸澶嶏紝璇烽噸鏂伴�夋嫨锛�");
+                        layer.msg("绗�" + (i + 1) + "琛岋細浠诲姟閲嶅锛岃閲嶆柊閫夋嫨锛�");
                         return false;
                     }
                     num.push(temp);
@@ -1110,6 +1110,7 @@
                             option.data[i - 1] = data[0];
                             option.data[i] = tables[0];
                             table.render(option);
+                            CheckedSet_tableSub();
                             break;
                         }
                     }
@@ -1132,6 +1133,7 @@
                             option.data[i + 1] = data[0];
                             option.data[i] = tables[0];
                             table.render(option);
+                            CheckedSet_tableSub();
                             break;
                         }
                     }
@@ -1153,6 +1155,7 @@
                             oldData.splice(obj.tr.data('index'), 1)
                             option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
                             table.render(option);
+                            CheckedSet_tableSub();
                             layer.close(index);
                         }
                     });
@@ -1385,8 +1388,10 @@
                                 }
                             }
                             table.render(option);
+                            CheckedSet_tableSub();
                         } else {
                             table.render(option);
+                            CheckedSet_tableSub();
                         }
                     }, error: function () {
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
@@ -1395,6 +1400,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