From 5f9c6a14b55836e12a8a6b5262e334a9d829cbfb Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 10 三月 2025 19:16:40 +0800
Subject: [PATCH] 1

---
 WebTM/views/设备管理/Sb_EquipDotCheckPlanBillEdit.html |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
index 3f3a551..a5fb2b7 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/Sb_EquipDotCheckPlanBillEdit.html"
@@ -236,6 +236,12 @@
             if (OperationType == 1) {//鏃犳簮鍗�
                 set_AddFNew();
             }
+            else if (OperationType == 2) {//濡傛灉淇敼鍒欒蛋涓嬮潰 new                                        //澶嶅埗
+                OperationType = 1;
+                set_EditFromGrid(linterid);
+                //鑾峰彇鏈�澶у崟鎹彿
+                get_MAXNum();
+            }
             else if (OperationType == 3) {//缂栬緫
                 //绂佺敤缁勭粐閫夐」
                 //$("#HUSEORGID").attr("disabled", true);
@@ -513,6 +519,7 @@
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNum",
                     type: "GET",
+                    async: false,
                     data: { "HBillType": sBillType },
                     success: function (d) {
                         var myDate = new Date();
@@ -550,13 +557,13 @@
             function set_EditFromGrid() {
                 set_EditForm(linterid);  //缂栬緫鑾峰彇琛ㄥご
                 set_EditGrid(linterid);  //缂栬緫鑾峰彇琛ㄤ綋
-                option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
-                table.render(option);
+                //option.data = [{ "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "", "HDotCheckItemClassID": 0, "HDotCheckItemClassName": "", "HDotCheckItemMethodID": 0, "HDotCheckItemMethodName": "" }];
+                //table.render(option);
 
 
                 set_EditGrid_Plan(linterid);  //缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
-                option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "鏈偣妫�", "DiffDate": 0 }];
-                table.render(option_plan);
+                //option.data = [{ "HPlanDate": "", "HPlanBeginTime": "", "HPlanEndTime": "", "HRelationFlag": "鏈偣妫�", "DiffDate": 0 }];
+                //table.render(option_plan);
             }
 
             // 鐐规淇℃伅
@@ -604,16 +611,16 @@
                 $.ajax({
                     url: GetWEBURL() + "Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListCheckDetai",
                     type: "GET",
+                    async: false,
                     data: {
                         "HID": linterid
                     },
                     success: function (result) {
-                        //console.log(result.code)
                         if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            //console.log(result)
                             var data = result.data.h_v_Sb_EquipDotCheckPlanBillList[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.鍐呴儴鍗曟嵁鍙�
                                 , "HEquipName": data.璁惧鍚嶇О
@@ -643,12 +650,12 @@
                 });
             }
             // 缂栬緫鑾峰彇琛ㄤ綋--鐐规椤圭洰
-            function set_EditGrid(linterid) {
-                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+            function set_EditGrid(linterid) {            
                 //缂栬緫鍔犺浇鏁版嵁
                 $.ajax({
                     url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/Sb_EquipDotCheckPlanBillListProjectDetai',
                     type: "GET",
+                    async: false,
                     data: { "sqlWhere": "and hmainid=" + linterid },
                     success: function (result) {
                         if (result.count == 1) {
@@ -657,7 +664,6 @@
                             for (var i = 0; i < data.length; i++) {
                                 subarr.push({ "HDotCheckItemID": data[i].鐐规椤圭洰ID, "HDotCheckCode": data[i].鐐规椤圭洰浠g爜, "HDotCheckItem": data[i].鐐规椤圭洰, "HDotCheckPart": data[i].鐐规閮ㄤ綅, "HClaim": data[i].鍏蜂綋瑕佹眰, "HManagerID": data[i].璐熻矗浜篒D, "HManagerCode": data[i].璐熻矗浜轰唬鐮�, "HManagerName": data[i].璐熻矗浜�, "HRemark": data[i].琛ㄤ綋澶囨敞, "HDotCheckItemClassID": data[i].HDotCheckItemClassID, "HDotCheckItemClassName": data[i].鐐规椤圭洰鍒嗙被鍚嶇О, "HDotCheckItemMethodID": data[i].HDotCheckItemMethodID, "HDotCheckItemMethodName": data[i].鐐规鏂规硶鍚嶇О });
                             }
-
                             option.data = subarr;
                             table.render(option);
 
@@ -672,12 +678,12 @@
             }
 
             // 缂栬緫鑾峰彇琛ㄤ綋--鐐规璁″垝
-            function set_EditGrid_Plan(linterid) {
-                $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
+            function set_EditGrid_Plan(linterid) {                
                 //缂栬緫鍔犺浇鏁版嵁
                 $.ajax({
                     url: GetWEBURL() + 'Sb_EquipDotCheckPlanBill/GetPlanList',
                     type: "GET",
+                    async: false,
                     data: { "sqlWhere": "and hmainid=" + linterid },
                     success: function (result) {
                         if (result.count == 1) {

--
Gitblit v1.9.1