Prechádzať zdrojové kódy

修复删除变更归档bug

ellisran 1 rok pred
rodič
commit
5ccaf0ecb5

+ 4 - 4
app/public/report/js/rpt_archive.js

@@ -468,7 +468,7 @@ let rptArchiveObj = {
             const width = (srcArea[JV.IDX_RIGHT] - srcArea[JV.IDX_LEFT]);
             const height = (srcArea[JV.IDX_BOTTOM] - srcArea[JV.IDX_TOP]);
             let rst = {
-                Left: srcArea[JV.IDX_LEFT] + offsetX, Top: srcArea[JV.IDX_TOP] + offsetY, width, height, 
+                Left: srcArea[JV.IDX_LEFT] + offsetX, Top: srcArea[JV.IDX_TOP] + offsetY, width, height,
                 PtCenterX: +((srcArea[JV.IDX_LEFT] + offsetX + width / 2) * PDF_SCALE).toFixed(2),
                 PtCenterY: +((ptChkHeight - (srcArea[JV.IDX_TOP] + offsetX + height / 2)) * PDF_SCALE).toFixed(2),
                 PtWidth: +(width * PDF_SCALE).toFixed(2), PtHeight: +(height * PDF_SCALE).toFixed(2),
@@ -670,7 +670,7 @@ let rptArchiveObj = {
         let rst = '-1';
         switch (current_stage_id) {
             case -300: // 变更令
-                rst = encodeURIComponent(CHNAGE_ID);
+                rst = encodeURIComponent(CHANGE_ID);
                 break;
             case -301: // 变更方案
             case -302: // 变更立项
@@ -678,7 +678,7 @@ let rptArchiveObj = {
                 rst = BUSINESS_ID;
                 break;
             default:
-                break;                            
+                break;
         }
         return rst;
     },
@@ -746,7 +746,7 @@ let rptArchiveObj = {
                                 // 这个跟上面的判断属性不同,是orgArea(签章的)
                                 for (let cIdx = pageItem.cells.length - 1; cIdx >= 0; cIdx--) {
                                     const cCell = pageItem.cells[cIdx];
-                                    if (cCell.area.Left === sCell.orgArea.Left && cCell.area.Right === sCell.orgArea.Right && 
+                                    if (cCell.area.Left === sCell.orgArea.Left && cCell.area.Right === sCell.orgArea.Right &&
                                         cCell.area.Top === sCell.orgArea.Top && cCell.area.Bottom === sCell.orgArea.Bottom &&
                                         cCell.Value !== '') {
                                         txtSignCells.push({bkCell: cCell, bkValue: cCell.Value});

+ 15 - 15
app/public/report/js/rpt_main.js

@@ -326,7 +326,7 @@ let zTreeOprObj = {
             params.isTextSignature = getTxtSignature();
             params.custCfg = CUST_CFG;
             params.detail_id = DETAIL_ID;
-            params.change_id = CHNAGE_ID;
+            params.change_id = CHANGE_ID;
             params.business_id = BUSINESS_ID;
             params.change_plan_id = CHNAGE_PLAN_ID;
             params.change_project_id = CHNAGE_PROJECT_ID;
@@ -336,7 +336,7 @@ let zTreeOprObj = {
             params.change_project_times = CHNAGE_PROJECT_TIMES;
             params.change_apply_times = CHNAGE_APPLY_TIMES;
             _getSplitAmendmentParam(params, treeNode);
-        
+
             rptArchiveObj.toggleBtn(false);
             if (customSelects) {
                 const gather_select = customSelects.gather_select.find(function (x) {
@@ -346,7 +346,7 @@ let zTreeOprObj = {
                     rptCustomObj.init(gather_select.custom_define, customSelects.stageFlow, gather_select);
                     return;
                 }
-    
+
                 const stage_select = customSelects.stage_select.find(function (x) {
                     return x.id === treeNode.refId;
                 });
@@ -354,7 +354,7 @@ let zTreeOprObj = {
                     rptCustomObj.init(stage_select.custom_define, customSelects.stageFlow, stage_select);
                     return;
                 }
-    
+
                 const material_sum_select = customSelects.material_sum_select.find(function (x) {
                     return x.id === treeNode.refId;
                 });
@@ -362,7 +362,7 @@ let zTreeOprObj = {
                     rptCustomObj.init(material_sum_select.custom_define, customSelects.stageFlow, material_sum_select);
                     return;
                 }
-                
+
                 const change_select = customSelects.change_select.find(function (x) {
                     return x.id === treeNode.refId;
                 });
@@ -420,7 +420,7 @@ let zTreeOprObj = {
             params.closeWatermark = getCloseWatermark();
             params.isTextSignature = getTxtSignature();
             params.detail_id = DETAIL_ID;
-            params.change_id = CHNAGE_ID;
+            params.change_id = CHANGE_ID;
             params.business_id = BUSINESS_ID;
             params.change_plan_id = CHNAGE_PLAN_ID;
             params.change_project_id = CHNAGE_PROJECT_ID;
@@ -441,7 +441,7 @@ let zTreeOprObj = {
                     rptCustomObj.init(gather_select.custom_define, customSelects.stageFlow, gather_select);
                     return;
                 }
-    
+
                 const stage_select = customSelects.stage_select.find(function (x) {
                     return x.id === me.currentNode.refId;
                 });
@@ -449,7 +449,7 @@ let zTreeOprObj = {
                     rptCustomObj.init(stage_select.custom_define, customSelects.stageFlow, stage_select);
                     return;
                 }
-    
+
                 const material_sum_select = customSelects.material_sum_select.find(function (x) {
                     return x.id === me.currentNode.refId;
                 });
@@ -457,7 +457,7 @@ let zTreeOprObj = {
                     rptCustomObj.init(material_sum_select.custom_define, customSelects.stageFlow, material_sum_select);
                     return;
                 }
-    
+
                 const change_select = customSelects.change_select.find(function (x) {
                     return x.id === me.currentNode.refId;
                 });
@@ -754,7 +754,7 @@ let rptControlObj = {
         rst.closeWatermark = getCloseWatermark();
         rst.isTextSignature = getTxtSignature();
         rst.detail_id = DETAIL_ID;
-        rst.change_id = CHNAGE_ID;
+        rst.change_id = CHANGE_ID;
         rst.business_id = BUSINESS_ID;
         rst.change_plan_id = CHNAGE_PLAN_ID;
         rst.change_project_id = CHNAGE_PROJECT_ID;
@@ -764,7 +764,7 @@ let rptControlObj = {
         rst.change_project_times = CHNAGE_PROJECT_TIMES;
         rst.change_apply_times = CHNAGE_APPLY_TIMES;
 
-    // rst.amendmentType = 
+    // rst.amendmentType =
         return rst;
     },
     getAllInOneBook: async function () {
@@ -940,7 +940,7 @@ let rptControlObj = {
             let roleRel = signatureRelArr[idx];
             ttlRoleAmt += roleRel.length;
             pageDataArr[idx][JV.NODE_PAGE_INFO][JV.NODE_MAIN_INFO_RPT_NAME] = rpt_names[idx];
-            
+
             // 这里要做些电子签名的signature_name转换,以防重名
             if (roleRel.length > 0) {
                 reAssignSignatureName(pageDataArr[idx], roleRel, rpt_names[idx]);
@@ -958,7 +958,7 @@ let rptControlObj = {
         }
         excelExportUtil.exportExcelInOneBook(pageDataArr, pageSize, TENDER_NAME, rptRoleRelArr, null, getStageStatus() !== 3);
     },
-    
+
     getExcel_New: async function (isOneBook) {
         let me = rptControlObj;
         if (zTreeOprObj.checkedRptTplNodes && zTreeOprObj.checkedRptTplNodes.length > 0 && PAGE_SHOW['closeExportExcel'] !== 1) {
@@ -1087,7 +1087,7 @@ let rptControlObj = {
         // dynamicLoadJs('/public/jspdf/SmartSimsun-normal.js', 'normal', me.getPdfFontCallbackLight);
         // dynamicLoadJs('/public/jspdf/SmartSimsun-normal2.js', 'normal', me.getPdfFontCallbackLight);
         // dynamicLoadJs('/public/jspdf/SmartSimsun-bold.js', 'bold', me.getPdfFontCallbackLight);
-        
+
         // dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', me.getPdfFontCallbackLight);
         dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', me.getPdfFontCallbackLight);
         dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', me.getPdfFontCallbackLight);
@@ -1107,7 +1107,7 @@ let rptControlObj = {
                 // dynamicLoadJs('/public/jspdf/SmartSimsun-normal.js',"normal", me.getPdfFontCallback);
                 // dynamicLoadJs('/public/jspdf/SmartSimsun-normal2.js',"normal", me.getPdfFontCallback);
                 // dynamicLoadJs('/public/jspdf/SmartSimsun-bold.js',"bold", me.getPdfFontCallback);
-                
+
                 // dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal.js', 'normal', me.getPdfFontCallback);
                 dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', me.getPdfFontCallback);
                 dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', me.getPdfFontCallback);

+ 1 - 1
app/view/report/index.ejs

@@ -402,7 +402,7 @@
     const SOURCE_TYPE = <%- source_type %>;
     const ALL_CHANGES = <%- changes %>;
     const BGL_OBJ = <%- bglObj %>;
-    const CHNAGE_ID = BGL_OBJ?.change?.cid || '-1';
+    const CHANGE_ID = BGL_OBJ?.change?.cid || '-1';
     const CHANGE_TIMES = BGL_OBJ?.change?.times || 1;
     const BUSINESS_ID = BGL_OBJ?.BUSINESS_ID || '-1';
     const CHNAGE_PLAN_ID = BGL_OBJ?.change_plan?.id || '-1';