Browse Source

台账修订上报,结算清单单价调整计算相关

MaiXinRong 1 year ago
parent
commit
74f679d459
3 changed files with 54 additions and 44 deletions
  1. 51 43
      app/const/tender_info.js
  2. 2 0
      app/controller/revise_controller.js
  3. 1 1
      app/service/ledger_history.js

+ 51 - 43
app/const/tender_info.js

@@ -13,26 +13,29 @@ const arrayInfo = ['chapter'];
 const defaultInfo = {
     // 合同信息
     deal_info: {
-        buildName: '',
-        dealCode: '',
-        dealName: '',
-        projectType: '',
-        dealType: '',
-        finalCode: '',
-        budgetApprovalCode: '',
+        buildName: '', // 建设项目名称
+        dealCode: '', // 合同编号
+        dealName: '', // 合同名称
+        projectType: '', // 工程类别
+        dealType: '', // 合同类别
+        finalCode: '', // 结算书编号
+        budgetApprovalCode: '', // 概算批复编号
     },
     // 参建单位
     construction_unit: {
+        // 建设
         build: {
-            company: '',
-            corporation: '',
-            date: '',
+            company: '', // 单位名称
+            corporation: '', // 法人代表
+            date: '', // 签订日期
         },
+        // 代建
         sub_build: {
             company: '',
             corporation: '',
             date: '',
         },
+        // 承包
         contract1: {
             company: '',
             corporation: '',
@@ -44,6 +47,7 @@ const defaultInfo = {
             corporation: '',
             date: '',
         },
+        // 监理
         supervision1: {
             company: '',
             corporation: '',
@@ -54,11 +58,13 @@ const defaultInfo = {
             corporation: '',
             date: '',
         },
+        // 检测
         detect: {
             company: '',
             corporation: '',
             date: '',
         },
+        // 审计
         audit: {
             company: '',
             corporation: '',
@@ -67,26 +73,27 @@ const defaultInfo = {
     },
     // 技术参数
     tech_param: {
-        loadLevel: 0,
-        loadLength: 0,
-        startPeg: '',
-        endPeg: '',
-        laneCount: 0,
-        dealPeriod: '',
-        startDate: '',
-        planEndDate: '',
-        realStartDate: '',
-        realEndDate: '',
-        structureScale: '',
-        mainContent: '',
+        loadLevel: 0, // 公路等级
+        loadLength: 0, // 长度
+        startPeg: '', // 起始桩号
+        endPeg: '', // 终止桩号
+        laneCount: 0, // 车道数
+        dealPeriod: '', // 合同工期
+        startDate: '', // 开工日期
+        planEndDate: '', // 计划完工日期
+        realStartDate: '', // 实际开工日期
+        realEndDate: '', // 实际完工日期
+        structureScale: '', // 构造物规模
+        mainContent: '', // 主要工作内容
     },
+    // 中标信息
     bid_info: {
-        controlPrice: 0,
-        bidPrice: 0,
-        bidStartDate: '',
-        bidType: '公开招标',
-        dealCalcType: '单价合同',
-        bidYuPrice: 0,
+        controlPrice: 0, // 业主控制价
+        bidPrice: 0, // 中标价
+        bidStartDate: '', // 开标日期
+        bidType: '公开招标', // 招标方式
+        dealCalcType: '单价合同', // 合同计价方式
+        bidYuPrice: 0, // 招标清单预算
     },
     // 小数位数
     decimal: {
@@ -115,12 +122,12 @@ const defaultInfo = {
     },
     // 合同参数
     deal_param: {
-        contractPrice: 0,
-        zanLiePrice: 0,
-        startAdvance: 0,
-        materialAdvance: 0,
-        safeAdvance: 0,
-        dustAdvance: 0,
+        contractPrice: 0, // 签约合同价
+        zanLiePrice: 0, // 暂列金额
+        startAdvance: 0, // 开工预付款
+        materialAdvance: 0, // 材料预付款
+        safeAdvance: 0, // 安全生产预付款
+        dustAdvance: 0, // 扬尘污染预付款
     },
     // 显示设置
     display: {
@@ -153,17 +160,18 @@ const defaultInfo = {
         {code: '1200', name: '消防系统'},
         {code: '1300', name: '供配电及照明系统'},
     ],
+    // 付款账号
     pay_account: {
-        project: {
-            name: '',
-            bank: '',
-            account: '',
-            rate: '',
-            contact: '',
-            phone: '',
-            num: '',
+        project: { // 工程款
+            name: '',  // 开户名称
+            bank: '', // 开户银行
+            account: '', // 开户账号
+            rate: '', // 分账划拨比例
+            contact: '', // 联系人
+            phone: '', // 联系电话
+            num: '', // 行号
         },
-        worker: {
+        worker: { // 农民工
             name: '',
             bank: '',
             account: '',

+ 2 - 0
app/controller/revise_controller.js

@@ -227,6 +227,7 @@ module.exports = app => {
                     throw '修订已审批通过,不可作废';
                 }
                 if (revise.valid) {
+                    revise.readySettle = await this.service.settle.getReadySettle(revise.tid);
                     const result = await ctx.service.ledgerRevise.cancelRevise(revise);
                 }
 
@@ -825,6 +826,7 @@ module.exports = app => {
                     throw '未填写修订内容,请先填写并保存修订内容';
                 }
                 if (revise.uid !== ctx.session.sessionUser.accountId) throw '上报失败';
+                revise.readySettle = await this.service.settle.getReadySettle(revise.tid);
 
                 await ctx.service.reviseAudit.start(revise, revise.times);
                 ctx.body = { err: 0, msg: '', data: {} };

+ 1 - 1
app/service/ledger_history.js

@@ -124,7 +124,7 @@ module.exports = app => {
                 await this.ctx.hisOss.put(this.ctx.hisOssPath + billsHis, Buffer.from(JSON.stringify(bills), 'utf8'));
                 await this.ctx.hisOss.put(this.ctx.hisOssPath + posHis, Buffer.from(JSON.stringify(pos), 'utf8'));
             } else {
-                const settleStatusBills = revise.readySettle ? await ctx.service.settleBills.getAllDataByCondition({ where: { settle_id: revise.readySettle.id }}): [];
+                const settleStatusBills = revise.readySettle ? await this.ctx.service.settleBills.getAllDataByCondition({ where: { settle_id: revise.readySettle.id }}): [];
                 this.ctx.helper.assignRelaData(bills, [
                     { data: settleStatusBills, fields: ['settle_status'], prefix: '', relaId: 'lid' },
                 ]);