Explorar el Código

台账修订,批量插入台账-计量单元问题

MaiXinRong hace 5 años
padre
commit
c5ee85300d
Se han modificado 2 ficheros con 3 adiciones y 1 borrados
  1. 1 0
      app/lib/rpt_data_analysis.js
  2. 2 1
      app/service/revise_bills.js

+ 1 - 0
app/lib/rpt_data_analysis.js

@@ -761,6 +761,7 @@ const union = {
 };
 const addSumChapter = {
     name: '添加章级合计',
+    intro: '在排序好的工程量清单列表中,根据清单所属章级,添加章级标题行、合计行',
     defaultSetting: {
         table: 'mem_stage_bills',
         code: 'b_code',

+ 2 - 1
app/service/revise_bills.js

@@ -115,13 +115,14 @@ module.exports = app => {
                 // 更新父项isLeaf
                 if (!lastChild) {
                     await this.transaction.update(this.tableName, {
+                        id: select.id,
                         is_leaf: false,
                         unit_price: null,
                         quantity: null,
                         total_price: null,
                         deal_qty: null,
                         deal_tp: null,
-                    }, {tender_id: rid, id: select.id});
+                    });
                 }
                 // 数据库创建新增节点数据
                 await this.transaction.insert(this.tableName, bills);