소스 검색

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

laiguoran 3 년 전
부모
커밋
ff2676d909
2개의 변경된 파일10개의 추가작업 그리고 9개의 파일을 삭제
  1. 6 5
      app/service/report_memory.js
  2. 4 4
      builder_report_index_define.js

+ 6 - 5
app/service/report_memory.js

@@ -791,11 +791,11 @@ module.exports = app => {
 
         }
 
-        async _generateChangeAudit(tid) {
-            if (this.changeData.audit !== null) return;
+        async _generateChangeAudit() {
+            if (!!this.changeData.audit) return;
 
             this.changeData.audit = [];
-            for (const c of change) {
+            for (const c of this.changeData.change) {
                 const changeAudit = await this.ctx.service.changeAudit.getListGroupByTimes(c.cid, c.times);
                 this.changeData.audit.push(...changeAudit);
             }
@@ -828,7 +828,7 @@ module.exports = app => {
                 await this.ctx.service.tender.checkTender(tid);
 
                 await this._generateChange(tid);
-                await this._generateChangeAudit(tid);
+                await this._generateChangeAudit();
                 return this.changeData.audit;
             } catch (err) {
                 return [];
@@ -1004,7 +1004,7 @@ module.exports = app => {
                     const material = this.ctx.helper._.find(materials, {order: material_order});
                     if (!material) return [];
                     const sql = 'SELECT m.id, m.tid, m.mid, m.t_type, m.code, m.name, m.unit, m.spec, m.m_type,' +
-                        '    m.basic_price, m.basic_times, m.remark, m.in_time,' +
+                        '    m.basic_price, m.basic_times, m.remark, m.in_time, m.m_tax, m.m_tax_tp, m.tax_pre_tp,' +
                         '    mh.quantity, mh.expr, mh.msg_tp, mh.msg_times, mh.msg_spread, mh.m_up_risk, mh.m_down_risk, mh.m_spread' +
                         '  FROM ' + this.ctx.service.materialBills.tableName + ' m' +
                         '  LEFT JOIN ' + this.ctx.service.materialBillsHistory.tableName + ' mh' +
@@ -1012,6 +1012,7 @@ module.exports = app => {
                         '  WHERE mh.mid = ?';
                     const sqlParam = [material.id];
                     result = await this.ctx.app.mysql.query(sql, sqlParam);
+                    console.log(result);
                 }
                 this._completeMaterialGl(result);
                 return result;

+ 4 - 4
builder_report_index_define.js

@@ -306,11 +306,11 @@ const change_bills = {
     ],
 };
 const change_audit = {
-    name: '工程-审批人 列表(mem_change_audit)',
+    name: '变更审批 列表(mem_change_audit)',
     remark: '',
     id: 73,
     key: 'mem_change_audit',
-    prefix: '材料调差-选择期',
+    prefix: '变更审批',
     cols: [
         { name: '变更令id', field: 'cid', type: dataType.str },
         { name: '审批人id', field: 'uid', type: dataType.int },
@@ -1382,10 +1382,10 @@ const materialGl = {
         { name: '创建时间', field: 'in_time', type: dataType.str },
         { name: '备注', field: 'remark', type: dataType.str },
 
-        { name: '税率', field: 'rate', type: dataType.int },
+        { name: '税率', field: 'm_tax', type: dataType.int },
 
         { name: '调差金额(材料税)', field: 'm_tax_tp', type: dataType.currency },
-        { name: '截止上期调差金额(材料税)', field: 'm_tax_pre_tp', type: dataType.currency },
+        { name: '截止上期调差金额(材料税)', field: 'tax_pre_tp', type: dataType.currency },
     ],
 };
 const material_bills = {