Browse Source

计量台账,导出Excel增加位置列

MaiXinRong 9 months ago
parent
commit
16d2165fea
3 changed files with 27 additions and 2 deletions
  1. 24 0
      app/const/audit.js
  2. 2 1
      app/public/js/stage.js
  3. 1 1
      app/service/construction_unit.js

+ 24 - 0
app/const/audit.js

@@ -24,6 +24,29 @@ const auditType = (function () {
     return { types, key, info };
 })();
 
+
+// 期审批流程
+const common = (function() {
+    const auditStatusInfo = [
+        { key: 'uncheck', value: 1, title: '待上报', class: '', btnTitle: '上报', btnClass: 'btn-primary' },
+        { key: 'checking', value: 2, title: '审批中', class: 'text-warning', btnTitle: '审批', btnClass: 'btn-success' },
+        { key: 'checked', value: 3, title: '审批通过', class: 'text-success', btnTitle: '', btnClass: 'btn-primary' },
+        { key: 'checkNo', value: 4, title: '审批退回', class: 'text-warning', btnTitle: '重新上报', btnClass: 'btn-primary' },
+        { key: 'checkNoPre', value: 5, title: '审批退回', class: 'text-warning', btnTitle: '重新审批', btnClass: 'btn-primary' },
+        { key: 'checkSkip', value: 6, title: '', class: '', btnTitle: '', btnClass: '' },
+        { key: 'checkCancel', value: 7, title: '撤回', class: 'text-warning', btnTitle: '', btnClass: '' },
+        { key: 'checkAgain', value: 8, title: '重新审批', class: 'text-warning', btnTitle: '', btnClass: '' },
+    ];
+    return (function(){
+        const status = {}, info = [];
+        for (const i of auditStatusInfo) {
+            status[i.key] = i.value;
+            info[i.value] = i;
+        }
+        return {status, info, timesLen: 100, backType: { org: 1, pre: 2 }};
+    })();
+})();
+
 // 台账审批流程
 const ledger = (function() {
     const status = {
@@ -1075,6 +1098,7 @@ const changePlan = (function() {
 
 // 推送类型
 const pushType = {
+    common,
     material: 1,
     stage: 2,
     change: 3,

+ 2 - 1
app/public/js/stage.js

@@ -220,6 +220,7 @@ $(document).ready(() => {
             {title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil', hAlign: 0, width: 100, formatter: '@', cellType: 'autoTip'},
             {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
             {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
+            {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 80, formatter: '@'},
         ],
         headRows: 2,
         headRowHeight: [25, 25],
@@ -1460,7 +1461,7 @@ $(document).ready(() => {
                                     quantity: p.quantity,
                                     contract_qty: p.contract_qty, qc_qty: p.qc_qty, gather_qty: p.gather_qty,
                                     end_contract_qty: p.end_contract_qty, end_qc_qty: p.end_qc_qty, end_gather_qty: p.end_gather_qty,
-                                    drawing_code: p.drawing_code, memo: p.memo, postil: p.postil,
+                                    drawing_code: p.drawing_code, memo: p.memo, postil: p.postil, position: p.position,
                                 });
                             }
                         }

+ 1 - 1
app/service/construction_unit.js

@@ -119,7 +119,7 @@ module.exports = app => {
         }
 
         async getReportData(pid) {
-            const data = this.getAllDataByCondition({ where: { pid } });
+            const data = await this.getAllDataByCondition({ where: { pid } });
             data.forEach(x => {
                 x.type_str = accountGroup.group[x.type];
             });