From 8563e4c5f60e3a59b83a66165cbbe4db1108cdf2 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 02 四月 2025 08:35:17 +0800
Subject: [PATCH] 新增 抢修附属工费报表、抢修费用汇总表、抢修汇总表、抢修考核出勤明细表  4个报表

---
 WebTM/views/设备管理/Sb_EquipMaintainPlanBillEdit.html |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
index e7e71ff..02990b0 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipMaintainPlanBillEdit.html"
@@ -68,7 +68,7 @@
                                                 <div class="layui-input-block" style="margin-left: 120px;width: 185px;">
                                                     <select name="HCycleUnit" lay-filter="aihao" id="HCycleUnit">
                                                         <option value="澶�">澶�</option>
-                                                        <option value="鍛�">鍛�</option>
+                                                        <!--<option value="鍛�">鍛�</option>-->
                                                         <option value="鏈�">鏈�</option>
                                                         <option value="骞�">骞�</option>
                                                     </select>
@@ -276,6 +276,12 @@
             //鍒ゆ柇鎿嶄綔绫诲瀷
             if (OperationType == 1) {//鏃犳簮鏂板
                 set_AddFNew();
+            }
+            else if (OperationType == 2) {//濡傛灉淇敼鍒欒蛋涓嬮潰 new                                        //澶嶅埗
+                OperationType = 1;            
+                set_EditFromGrid(linterid);
+                //鑾峰彇鏈�澶у崟鎹彿
+                get_MAXNum();               
             }
             else if (OperationType == 3) {//缂栬緫
                 set_EditFromGrid(linterid);
@@ -640,6 +646,7 @@
                     , { field: 'HPlanBeginTime', title: '璁″垝寮�濮嬫椂闂寸偣' }
                     , { field: 'HPlanEndTime', title: '璁″垝缁撴潫鏃堕棿鐐�' }
                     , { field: 'HSafeEndTime', title: '瀹夊叏缁撴潫鏃堕棿鐐�' }
+                    , { field: 'HErrBeginTime', title: '棰勮寮�濮嬫椂闂寸偣' }
                     , { field: 'HRelationFlag', title: '鍏宠仈鏍囪' }
                     , { field: 'DiffDate', title: '鐩稿樊闂撮殧' }
                 ];
@@ -676,6 +683,7 @@
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNum",
                     type: "GET",
+                    async: false,
                     data: { "HBillType": sBillType },
                     success: function (d) {
                         //console.log(d.data);
@@ -713,31 +721,31 @@
             function set_EditFromGrid(linterid) {
                 set_EditForm(linterid);  //缂栬緫鑾峰彇琛ㄥご
                 set_EditGrid(linterid);  //缂栬緫鑾峰彇琛ㄤ綋
-                option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
-                table.render(option);
+                //option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
+                //table.render(option);
 
-                option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "0", "HRemark": "" }];
-                table.render(option1);
+                //option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HQty": "0", "HRemark": "" }];
+                //table.render(option1);
 
                 set_EditGrid_Plan(linterid);  //缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
-                option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HSafeEndTime": "","HRelationFlag": "鏈偣妫�", "DiffDate": 0 }];
-                table.render(option_plan);
+                //option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HSafeEndTime": "", "HErrBeginTime": "","HRelationFlag": "鏈偣妫�", "DiffDate": 0 }];
+                //table.render(option_plan);
             }
             //缂栬緫鑾峰彇琛ㄥご
             function set_EditForm(linterid) {
                 $.ajax({
                     url: GetWEBURL() + "Sb_EquipMaintainPlanBill/Sb_EquipMaintainPlanBillListCheckDetai",
                     type: "GET",
+                    async: false,
                     data: {
                         "HID": linterid
                     },
-                    success: function (result) {
-                        //console.log(result.code)
+                    success: function (result) {                  
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            console.log(result)
                             var data = result.data.h_v_Sb_EquipMaintainPlanBillList[0];
                             form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
-                                "HBillNo": data.鍗曟嵁鍙�
+                                "HInterID": OperationType == 2 ? "" : linterid
+                                , "HBillNo": OperationType == 2 ? "" : data.鍗曟嵁鍙�
                                 , "HDate": formatDate(data.鏃ユ湡)
                                 , "HInnerBillNo": data.鍐呴儴鍗曟嵁鍙�
                                 , "HEquipID": data.璁惧ID
@@ -770,11 +778,11 @@
             }
             //缂栬緫鑾峰彇琛ㄤ綋
             function set_EditGrid(linterid) {
-                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
                 //缂栬緫鍔犺浇鏁版嵁
                 $.ajax({
                     url: GetWEBURL() + 'Sb_EquipMaintainPlanBill/Sb_EquipMaintainPlanBillListProjectDetaiNew',
                     type: "GET",
+                    async: false,
                     data: { "HInterID": linterid },
                     success: function (result) {
                         if (result.count == 1) {
@@ -854,11 +862,11 @@
 
             // 缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
             function set_EditGrid_Plan(linterid) {
-                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
                 //缂栬緫鍔犺浇鏁版嵁
                 $.ajax({
                     url: GetWEBURL() + 'Sb_EquipMaintainPlanBill/GetPlanList',
                     type: "GET",
+                    async: false,
                     data: { "sqlWhere": "and hmainid=" + linterid },
                     success: function (result) {
                         if (result.count == 1) {
@@ -868,7 +876,7 @@
                                 rowdata.push(
                                     {
                                         "HPlanDate": Pub_Format(data[i].璁″垝鏃ユ湡, "yyyy-MM-dd"), "HPlanBeginTime": Pub_Format(data[i].璁″垝寮�濮嬫椂闂寸偣, "yyyy-MM-dd hh:mm:ss"), "HPlanEndTime": Pub_Format(data[i].璁″垝缁撴潫鏃堕棿鐐�, "yyyy-MM-dd hh:mm:ss"), "HSafeEndTime": Pub_Format(data[i].瀹夊叏缁撴潫鏃堕棿鐐�, "yyyy-MM-dd hh:mm:ss")
-                                        , "HRelationFlag": data[i].鍏宠仈鏍囪, "DiffDate": data[i].鐩稿樊闂撮殧
+                                        , "HErrBeginTime": Pub_Format(data[i].棰勮寮�濮嬫椂闂寸偣, "yyyy-MM-dd hh:mm:ss"), "HRelationFlag": data[i].鍏宠仈鏍囪, "DiffDate": data[i].鐩稿樊闂撮殧
                                     }
                                 )
                             }

--
Gitblit v1.9.1