From 9ac8cf7aae3530cfba66ae39f72a4de1617148cb Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 10 七月 2023 12:23:35 +0800
Subject: [PATCH] 1

---
 WebTM/views/项目管理/项目阶段/PM_ProjectStageBill.html    |   57 ++++++++++++++++++----------
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user |    6 +-
 2 files changed, 40 insertions(+), 23 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index ed9b59d..bb25539 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -3639,10 +3639,10 @@
       <publishTime>04/11/2023 16:34:43</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBill.html">
-      <publishTime>07/08/2023 11:00:34</publishTime>
+      <publishTime>07/10/2023 11:06:50</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBill.html">
-      <publishTime>07/08/2023 11:00:34</publishTime>
+      <publishTime>07/10/2023 11:06:50</publishTime>
     </File>
     <File Include="views/璁″垝绠$悊/宸ヨ壓璺嚎/Gy_RoutingBillimport.html">
       <publishTime>04/11/2023 16:34:43</publishTime>
@@ -4311,7 +4311,7 @@
       <publishTime>07/09/2023 22:33:09</publishTime>
     </File>
     <File Include="views/椤圭洰绠$悊/椤圭洰闃舵/PM_ProjectStageBill.html">
-      <publishTime>07/10/2023 10:17:15</publishTime>
+      <publishTime>07/10/2023 11:44:30</publishTime>
     </File>
     <File Include="views/椤圭洰绠$悊/椤圭洰闃舵/PM_ProjectStageBillList.html">
       <publishTime>07/09/2023 02:05:17</publishTime>
diff --git "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/PM_ProjectStageBill.html" "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/PM_ProjectStageBill.html"
index 9953adc..592f766 100644
--- "a/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/PM_ProjectStageBill.html"
+++ "b/WebTM/views/\351\241\271\347\233\256\347\256\241\347\220\206/\351\241\271\347\233\256\351\230\266\346\256\265/PM_ProjectStageBill.html"
@@ -223,7 +223,12 @@
         <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
         <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
     </script>
-
+    <!--閲岀▼纰�-->
+    <script type="text/html" id="HIsKey">
+        <div class="layui-input-block" style="margin-left: 20px;">
+            <input type="checkbox" name="HIsKey" lay-filter="HIsKey" id="HIsKey{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+        </div>
+    </script>
     <script>
 
         layui.config({
@@ -354,6 +359,19 @@
             //#endregion
             //#endregion
 
+            //#region 澶嶉�夋 閫変腑/鍙栨秷 瑙﹀彂浜嬩欢
+            //#region 閲岀▼纰�
+            form.on('checkbox(HIsKey)', function (data) {
+                //鑾峰彇涓嬫媺妗嗛�変腑鐨勫��
+                var elem = data.othis.parents('tr');
+                var dataindex = elem.attr("data-index");
+                $.each(option.data, function (index, value) {
+                    if (value.LAY_TABLE_INDEX == dataindex) {
+                        value.HIsKey = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+                    }
+                });
+            });
+            //#endregion
             //#endregion
 
             //#region 瀛愯〃锛氬ご宸ュ叿鏍忎簨浠�
@@ -370,14 +388,8 @@
                     , 'HStageNote': ''
                     , 'HPMGoodsID': '0'
                     , 'HPMGoodsName': ''
-                    , 'HIsKey': '0'
+                    , 'HIsKey': false
                     , 'HRate': '0'
-                    //, 'HEmpID': '0'
-                    //, 'HEmpName': ''
-                    //, 'HCheckEmpID': '0'
-                    //, 'HCheckEmpName': ''
-                    //, 'HFinishDate': ''
-                    //, 'HWorkDays': '0'
                     , 'HRemarkSub': ''
                 };
                 switch (obj.event) {
@@ -444,7 +456,7 @@
             //#endregion
 
 
-            
+
             //
             form.on('submit(Cancel)', function () {
                 //sessionStorage["SourceFlag"] = false;
@@ -542,10 +554,10 @@
                         , { field: 'RowID', title: '琛屽彿', hide: true }                                                   //琛屾爣璇嗭紝鐢ㄤ簬涓嬩竴琛屻�佷笂涓�琛岃瘑鍒墍鍦ㄨ
                         , { field: 'HProjectStageID', title: '椤圭洰闃舵ID', hide: true }
                         , { field: 'HProjectStageName', title: '椤圭洰闃舵', edit: 'text', event: "HProjectStageName" }     //f7
-                        , { field: 'HStageNote', title: '椤圭洰闃舵璇︾粏鍐呭'}
+                        , { field: 'HStageNote', title: '椤圭洰闃舵璇︾粏鍐呭' }
                         , { field: 'HPMGoodsID', title: '鐩稿叧浜や粯鐗㊣D', hide: true }
                         , { field: 'HPMGoodsName', title: '鐩稿叧浜や粯鐗�', edit: 'text', event: "HPMGoodsName" }            //f7
-                        , { field: 'HIsKey', title: '閲岀▼纰�', edit: 'text' }
+                        , { field: 'HIsKey', title: '閲岀▼纰�', templet: "#HIsKey" }
                         , { field: 'HRate', title: '涓氱哗鍗犳瘮', edit: 'text' }
                         //, { field: 'HEmpID', title: '闃舵璐熻矗浜篒D', hide: true }
                         //, { field: 'HEmpName', title: '闃舵璐熻矗浜�', edit: 'text', event: "HEmpName" }                    //f7
@@ -566,7 +578,7 @@
                         , 'HStageNote': ''
                         , 'HPMGoodsID': '0'
                         , 'HPMGoodsName': ''
-                        , 'HIsKey': '0'
+                        , 'HIsKey': false
                         , 'HRate': '0'
                         //, 'HEmpID': '0'
                         //, 'HEmpName': ''
@@ -598,7 +610,7 @@
                 //鑾峰彇琛ㄥご鏁版嵁骞跺簭鍒楀寲
                 var sMainStr = JSON.stringify(data.field);              //涓昏〃鏁版嵁
                 //瀛愯〃鏁版嵁搴忓垪鍖�
-                var sSubStr = JSON.stringify(num);                      
+                var sSubStr = JSON.stringify(num);
 
                 //鎷兼帴搴忓垪鍖栫殑鏁版嵁
                 var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"];
@@ -664,11 +676,16 @@
                         });
 
                         //瀛愯〃  璧嬪��
-                        for (var i = 0; i < tableSub.length; i++) {
-                            tableSub[i].HIsKey = (tableSub[i].HIsKey) ? 1 : 0;
-                        }
                         option.data = tableSub;
                         table.render(option);
+                        
+                        //瀵瑰瓙琛ㄤ腑鐨勫閫夋杩涜閫変腑
+                        for (var i = 0; i < tableSub.length; i++) {
+                            if (tableSub[i].HIsKey) {
+                                $('#HIsKey' + (i + 1)).attr("checked", true);
+                            }
+                        }
+                        form.render('checkbox');
                     }
                 })
             }
@@ -812,10 +829,10 @@
                                 return;
                             }
                         }
-                        //閲岀▼纰戝唴瀹规楠�
-                        if (option.data[i]["HIsKey"] != "1" && option.data[i]["HIsKey"] != "0") {
-                            layer.msg("閲岀▼纰戣杈撳叆0鎴�1锛�");
-                        }
+                        ////閲岀▼纰戝唴瀹规楠�
+                        //if (option.data[i]["HIsKey"] != "1" && option.data[i]["HIsKey"] != "0") {
+                        //    layer.msg("閲岀▼纰戣杈撳叆0鎴�1锛�");
+                        //}
                     }
                 }
                 //#endregion

--
Gitblit v1.9.1