Sfoglia il codice sorgente

巡检报告增加签字页面

seimin 2 anni fa
parent
commit
5baac7ad31

+ 24 - 18
assets/js/controllers/inspect/inspectReportCtrl.js

@@ -66,26 +66,32 @@ app.controller("inspectReportCtrl", [
66 66
     //     }
67 67
     // }
68 68
     // 打印
69
+    $scope.signObj = {};
69 70
     $scope.print = function () {
70
-      console.log(Print);
71
-      Print("#print", {
72
-        padding:'5 5',
73
-        afterprint: () => {},
74
-        cancel: () => {},
75
-      });
76
-      // 保证打印正好铺满A4高度
77
-      let A4height = 297; // A4高度297mm
78
-      let ctxpage = document.querySelectorAll(".fm");
79
-      ctxpage.forEach((i, k) => {
80
-        let eachpage_mm = px2mm(i.clientHeight); // 单位px转mm
81
-        console.log(k + "页高度px:", i.clientHeight, "高度mm:", eachpage_mm);
71
+      $rootScope.isMask = true;
72
+      api_bpm_data.signatureForm({inspectionId: $scope.queryList.title.id, batchNo: $scope.queryList.batchNo.id}).then(function (result) {
73
+        $scope.signObj = result;
74
+        $rootScope.isMask = false;
75
+        console.log(Print);
76
+        Print("#print", {
77
+          padding:'5 5',
78
+          afterprint: () => {},
79
+          cancel: () => {},
80
+        });
81
+        // 保证打印正好铺满A4高度
82
+        let A4height = 297; // A4高度297mm
83
+        let ctxpage = document.querySelectorAll(".fm");
84
+        ctxpage.forEach((i, k) => {
85
+          let eachpage_mm = px2mm(i.clientHeight); // 单位px转mm
86
+          console.log(k + "页高度px:", i.clientHeight, "高度mm:", eachpage_mm);
82 87
 
83
-        //高度大于A4,则按比例缩小打印区域
84
-        if (eachpage_mm > A4height) {
85
-          let zoom = A4height / eachpage_mm;
86
-          console.log(k + "页zoom:", zoom);
87
-          i.style.zoom = zoom;
88
-        }
88
+          //高度大于A4,则按比例缩小打印区域
89
+          if (eachpage_mm > A4height) {
90
+            let zoom = A4height / eachpage_mm;
91
+            console.log(k + "页zoom:", zoom);
92
+            i.style.zoom = zoom;
93
+          }
94
+        });
89 95
       });
90 96
     };
91 97
 

+ 4 - 0
assets/js/main.js

@@ -951,6 +951,10 @@ app.factory('api_bpm_data', ['BpmRestangular', function (BpmRestangular) {
951 951
     var inspectionProcessActual = BpmRestangular.all("InspectionProcessActual");
952 952
     var solutionService = BpmRestangular.all("solution");
953 953
     return {
954
+        // 巡检报告签字信息
955
+        signatureForm: function (data) {
956
+            return dataService.customPOST(data, 'signatureForm');
957
+        },
954 958
         // 批量恢复
955 959
         oneClickRecovery: function (data) {
956 960
             return dataService.customPOST(data, 'oneClickRecovery');

+ 26 - 0
assets/views/inspect/inspectReport.html

@@ -203,12 +203,38 @@
203 203
           margin: 0 2px;
204 204
           cursor: pointer;
205 205
         }
206
+        #print .qz{
207
+          height: 100%;
208
+          font-size: 32px;
209
+          line-height: 2;
210
+          padding-top: 100px;
211
+          padding-bottom: 100px;
212
+        }
213
+        #print .qz .qz_right{
214
+          float: right;
215
+          margin-right: 200px;
216
+          margin-top: 50px;
217
+        }
218
+        #print .qz .qz_inner > div{
219
+          text-indent: 2em;
220
+        }
206 221
       </style>
207 222
       <div class="fm">
208 223
         <h1>巡&nbsp;&nbsp;检&nbsp;&nbsp;报&nbsp;&nbsp;告</h1>
209 224
         <h2>{{queryList.title?queryList.title.title.split('').join('&nbsp;'):''}}</h2>
210 225
         <h3>批次号:{{queryList.batchNo?queryList.batchNo.name:''}}</h3>
211 226
       </div>
227
+      <div class="qz">
228
+        <div class="qz_inner">
229
+          <div>本次巡检计划“{{queryList.title?queryList.title.title:''}}”既定巡检任务{{signObj.total}}条,已完成巡检{{signObj.ywcTotal}}条,巡检计划是在{{signObj.creatTime | date: 'yyyy年MM月dd日'}}建立,第一次巡检任务执行为{{signObj.oldTime | date: 'yyyy年MM月dd日'}}执行人为{{signObj.oldTimeUser}},最后一次巡检为{{signObj.newTime | date: 'yyyy年MM月dd日'}}执行人为{{signObj.newTimeUser}};</div>
230
+          <div>巡检范围包括{{signObj.regionList.join('、')}}。</div>
231
+          <div>各巡检人员执行巡检任务数{{signObj.userList.join('、')}}。</div>
232
+          <div class="qz_right">
233
+            <div>确认签字:</div>
234
+            <div>日期:</div>
235
+          </div>
236
+        </div>
237
+      </div>
212 238
       <table>
213 239
         <tr>
214 240
           <th width="5%">序号</th>