Browse Source

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

Tony Kang 2 years ago
parent
commit
dd4f0bab23

+ 1 - 0
app/lib/sql_builder.js

@@ -269,6 +269,7 @@ class SqlBuilder {
 
         const orderArr = [];
         for (const index in this.orderBy) {
+            if (!this.orderBy[index]) continue;
             orderArr.push(' ?? ' + this.orderBy[index][1]);
             this.sqlParam.push(this.orderBy[index][0]);
         }

+ 18 - 20
app/public/js/budget_compare.js

@@ -30,7 +30,15 @@ $(document).ready(() => {
             {title: '施工图预算|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'yu_dgn_qty', hAlign: 2, width: 80, bc_type: 'number'},
             {title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'yu_dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
             {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'yu_tp', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
+            {title: '台账|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'dgn_qty', hAlign: 2, width: 80, bc_type: 'number', visible: false},
+            {title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number', visible: false},
+            {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number', visible: false},
+            {title: '决算|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'final_dgn_qty', hAlign: 2, width: 80, bc_type: 'number', visible: false},
+            {title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'final_dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number', visible: false},
+            {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'final_tp', hAlign: 2, width: 80, type: 'Number', bc_type: 'number', visible: false},
             {title: '数据对比', colSpan: '1', rowSpan: '2', field: 'stackedBar', hAlign: 0, width: 300, cellType: 'stackedBar', stackedBarCover: false, bc_type: 'grid', visible: false},
+            {title: '增幅%|数量1/数量2', colSpan: '2|1', rowSpan: '1|1', field: 'grow_dgn_qty', hAlign: 2, width: 80},
+            {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'grow_tp', hAlign: 2, width: 80, type: 'Number'},
         ],
         emptyRows: 0,
         headRows: 2,
@@ -51,22 +59,13 @@ $(document).ready(() => {
             return this.finalInfo ? this.finalInfo.id : undefined;
         },
         initFinalCol() {
-            if (spreadSetting.cols.length < 14) {
-                spreadSetting.cols.pop();
-                spreadSetting.cols.push(...[
-                    {title: '台账|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'dgn_qty', hAlign: 2, width: 80, bc_type: 'number'},
-                    {title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
-                    {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
-                    {title: '决算|数量1/数量2', colSpan: '3|1', rowSpan: '1|1', field: 'final_dgn_qty', hAlign: 2, width: 80, bc_type: 'number'},
-                    {title: '|经济指标', colSpan: '|1', rowSpan: '|1', field: 'final_dgn_price', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
-                    {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'final_tp', hAlign: 2, width: 80, type: 'Number', bc_type: 'number'},
-                    {title: '数据对比', colSpan: '1', rowSpan: '2', field: 'stackedBar', hAlign: 0, width: 300, cellType: 'stackedBar', stackedBarCover: false, bc_type: 'grid', visible: false},
-                    {title: '增幅%|数量1/数量2', colSpan: '2|1', rowSpan: '1|1', field: 'grow_dgn_qty', hAlign: 2, width: 80},
-                    {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'grow_tp', hAlign: 2, width: 80, type: 'Number'},
-                ]);
+            const finalColField = ['dgn_qty', 'dgn_price', 'total_price', 'final_dgn_qty', 'final_dgn_price', 'final_tp', 'grow_dgn_qty', 'grow_tp'];
+            const finalCol = spreadSetting.cols.filter(x => { return finalColField.indexOf(x.field) >= 0; });
+            if (finalCol.length > 0 && !finalCol[0].visible) {
+                finalCol.forEach(x => { x.visible = true; });
                 this.initShowType();
-                SpreadJsObj.reLoadSheetHeader(compareSheet);
-            };
+                SpreadJsObj.refreshColumnVisible(compareSheet);
+            }
         },
         initShowType() {
             const type = this.compareType;
@@ -219,9 +218,9 @@ $(document).ready(() => {
             SpreadJsObj.reloadColData(compareSheet, colIndex);
         },
         setCompareType(type) {
-            this.compareType = type;
+            this.compareType = type || 'number';
             $('[name=showType]').removeClass('active');
-            $(`[tag=${type}]`).addClass('active');
+            $(`[tag=${this.compareType}]`).addClass('active');
             if (this.compareType === 'grid') {
                 $('.ml-auto').show();
             } else {
@@ -231,14 +230,14 @@ $(document).ready(() => {
                 if (!x.bc_type) return;
                 x.visible = x.bc_type === type;
             });
-            setLocalCache(compareTypeKey, type);
+            setLocalCache(compareTypeKey, this.compareType);
         },
         setStackedBarCover(cover){
             this.stackedBarCover = cover || '1';
             const colIndex = spreadSetting.cols.findIndex(x => { return x.field === 'stackedBar'});
             spreadSetting.cols[colIndex].stackedBarCover = parseInt(cover);
             SpreadJsObj.reloadColData(compareSheet, colIndex);
-            setLocalCache(stackedBarCoverKey, cover);
+            setLocalCache(stackedBarCoverKey, this.stackedBarCover);
         }
     };
     compareObj.loadCacheData();
@@ -283,7 +282,6 @@ $(document).ready(() => {
         } else {
             compareObj.loadBudgetData(result);
         }
-
     });
 
     $.subMenu({

+ 1 - 1
app/public/js/shares/cs_tools.js

@@ -980,7 +980,7 @@ const showSelectTab = function(select, spread, afterShow) {
 
         $('body').on('click', '[name=bills-tag-locate]', function () {
             const lid = parseInt(this.getAttribute('lid'));
-            SpreadJsObj.locateTreeNode(setting.relaSpread.getActiveSheet(), lid);
+            SpreadJsObj.locateTreeNode(setting.relaSpread.getActiveSheet(), lid, true);
             setting.afterLocated && setting.afterLocated();
         });
         $('body').on('click', '[name=bills-tag-edit]', function () {

+ 19 - 3
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -307,7 +307,6 @@ const SpreadJsObj = {
         const setting = sheet.zh_setting;
         if (!setting || !setting.cols) { return; }
 
-        sheet.setColumnCount(0);
         sheet.setColumnCount(setting.cols.length);
         sheet.setRowCount(setting.headRows, spreadNS.SheetArea.colHeader);
         for (let iRow = 0; iRow < setting.headRowHeight.length; iRow ++) {
@@ -2539,7 +2538,7 @@ const SpreadJsObj = {
         getStackedBarCellType: function () {
             const stackedBarCellType = function(){};
             stackedBarCellType.prototype = new spreadNS.CellTypes.Text();
-            const indent = 3, defaultR = 3, minHeight = 2;
+            const indent = 3, defaultR = 0.05, minHeight = 2;
             /**
              * 画一个长条
              * @param {Object} canvas - 画布
@@ -2547,6 +2546,23 @@ const SpreadJsObj = {
              * @param {String} lineColor - 画线颜色
              * @param {String} fillColor - 填充颜色
              */
+            // roundRect方法在Chrome99版本以后才支持
+            const drawBarbefore99 = function (canvas, x, y, w, h, r, color) {
+                canvas.save();
+                // 设置偏移量
+                canvas.translate(0.5, 0.5);
+                canvas.strokeStyle = color;
+                canvas.beginPath();
+                canvas.moveTo(x+r, y);
+                canvas.arcTo(x+w, y, x+w, y+h, r);
+                canvas.arcTo(x+w, y+h, x, y+h, r);
+                canvas.arcTo(x, y+h, x, y, r);
+                canvas.arcTo(x, y, x+w, y, r);
+                canvas.stroke();
+                canvas.fillStyle = color;
+                canvas.fill();
+                canvas.restore();
+            };
             const drawBar = function (canvas, x, y, w, h, r, color) {
                 canvas.save();
                 // 设置偏移量
@@ -2589,7 +2605,7 @@ const SpreadJsObj = {
                     let width = ZhCalc.mul(validWidth, bd.percent, 2);
                     if (width < defaultR) continue;
                     const top = col.stackedBarCover ? startTop : startTop + height * i + i - 1;
-                    drawBar(canvas, left, top, width, height, defaultR, bd.color);
+                    drawBarbefore99(canvas, left, top, width, height, ZhCalc.mul(height, defaultR, 2), bd.color);
                 }
             };
             return new stackedBarCellType();

+ 4 - 131
app/service/rpt_stage_sum_memory.js

@@ -12,134 +12,6 @@ const Ledger = require('../lib/ledger');
 const PayCalculator = require('../lib/pay_calc');
 
 const auditConst = require('../const/audit');
-const payConst = require('../const/deal_pay');
-
-const moment = require('moment');
-
-const indexPre = 'id_';
-
-
-const gatherUtils = {
-    completeStageSumData: function (datas, completeDatas) {
-        for (const data of datas) {
-            for (const cd of completeDatas) {
-                data[cd.prefix + 'order'] = cd.order;
-            }
-        }
-    },
-    gatherStage: function (tender, gatherNode, sourceNode, prefix, helper) {
-        gatherNode[prefix + 'id'] = tender.id;
-        gatherNode[prefix + 'name'] = tender.name;
-
-        gatherNode[prefix + "qty"] = helper.add(gatherNode[prefix + "qty"], sourceNode.quantity);
-        gatherNode[prefix + "tp"] = helper.add(gatherNode[prefix + "tp"], sourceNode.total_price);
-
-        gatherNode[prefix + "dgn_qty1"] = helper.add(gatherNode[prefix + "dgn_qty1"], sourceNode.dgn_qty1);
-        gatherNode[prefix + "dgn_qty2"] = helper.add(gatherNode[prefix + "dgn_qty2"], sourceNode.dgn_qty2);
-
-        gatherNode[prefix + "contract_qty"] = helper.add(gatherNode[prefix + "contract_qty"], sourceNode.contract_qty);
-        gatherNode[prefix + "contract_tp"] = helper.add(gatherNode[prefix + "contract_tp"], sourceNode.contract_tp);
-        gatherNode[prefix + "qc_qty"] = helper.add(gatherNode[prefix + "qc_qty"], sourceNode.qc_qty);
-        gatherNode[prefix + "qc_tp"] = helper.add(gatherNode[prefix + "qc_tp"], sourceNode.qc_tp);
-        gatherNode[prefix + "gather_qty"] = helper.add(gatherNode[prefix + "gather_qty"], sourceNode.gather_qty);
-        gatherNode[prefix + "gather_tp"] = helper.add(gatherNode[prefix + "gather_tp"], sourceNode.gather_tp);
-
-        gatherNode[prefix + "pre_contract_qty"] = helper.add(gatherNode[prefix + "pre_contract_qty"], sourceNode.pre_contract_qty);
-        gatherNode[prefix + "pre_contract_tp"] = helper.add(gatherNode[prefix + "pre_contract_tp"], sourceNode.pre_contract_tp);
-        gatherNode[prefix + "pre_qc_qty"] = helper.add(gatherNode[prefix + "pre_qc_qty"], sourceNode.pre_qc_qty);
-        gatherNode[prefix + "pre_qc_tp"] = helper.add(gatherNode[prefix + "pre_qc_tp"], sourceNode.pre_qc_tp);
-        gatherNode[prefix + "pre_gather_qty"] = helper.add(gatherNode[prefix + "pre_gather_qty"], sourceNode.pre_gather_qty);
-        gatherNode[prefix + "pre_gather_tp"] = helper.add(gatherNode[prefix + "pre_gather_tp"], sourceNode.pre_gather_tp);
-
-        gatherNode[prefix + "end_contract_qty"] = helper.add(gatherNode[prefix + "end_contract_qty"], sourceNode.end_contract_qty);
-        gatherNode[prefix + "end_contract_tp"] = helper.add(gatherNode[prefix + "end_contract_tp"], sourceNode.end_contract_tp);
-        gatherNode[prefix + "end_qc_qty"] = helper.add(gatherNode[prefix + "end_qc_qty"], sourceNode.end_qc_qty);
-        gatherNode[prefix + "end_qc_tp"] = helper.add(gatherNode[prefix + "end_qc_tp"], sourceNode.end_qc_tp);
-        gatherNode[prefix + "end_gather_qty"] = helper.add(gatherNode[prefix + "end_gather_qty"], sourceNode.end_gather_qty);
-        gatherNode[prefix + "end_gather_tp"] = helper.add(gatherNode[prefix + "end_gather_tp"], sourceNode.end_gather_tp);
-
-        gatherNode[prefix + "deal_dgn_qty1"] = helper.add(gatherNode[prefix + "deal_dgn_qty1"], sourceNode.deal_dgn_qty1);
-        gatherNode[prefix + "deal_dgn_qty2"] = helper.add(gatherNode[prefix + "deal_dgn_qty2"], sourceNode.deal_dgn_qty2);
-        gatherNode[prefix + "c_dgn_qty1"] = helper.add(gatherNode[prefix + "c_dgn_qty1"], sourceNode.c_dgn_qty1);
-        gatherNode[prefix + "c_dgn_qty2"] = helper.add(gatherNode[prefix + "c_dgn_qty2"], sourceNode.c_dgn_qty2);
-
-        gatherNode['s_' + "qty"] = helper.add(gatherNode['s_' + "qty"], sourceNode.quantity);
-        gatherNode['s_' + "tp"] = helper.add(gatherNode['s_' + "tp"], sourceNode.total_price);
-
-        gatherNode['s_' + "contract_qty"] = helper.add(gatherNode['s_' + "contract_qty"], sourceNode.contract_qty);
-        gatherNode['s_' + "contract_tp"] = helper.add(gatherNode['s_' + "contract_tp"], sourceNode.contract_tp);
-        gatherNode['s_' + "qc_qty"] = helper.add(gatherNode['s_' + "qc_qty"], sourceNode.qc_qty);
-        gatherNode['s_' + "qc_tp"] = helper.add(gatherNode['s_' + "qc_tp"], sourceNode.qc_tp);
-        gatherNode['s_' + "gather_qty"] = helper.add(gatherNode['s_' + "gather_qty"], sourceNode.gather_qty);
-        gatherNode['s_' + "gather_tp"] = helper.add(gatherNode['s_' + "gather_tp"], sourceNode.gather_tp);
-
-        gatherNode['s_' + "pre_contract_qty"] = helper.add(gatherNode['s_' + "pre_contract_qty"], sourceNode.pre_contract_qty);
-        gatherNode['s_' + "pre_contract_tp"] = helper.add(gatherNode['s_' + "pre_contract_tp"], sourceNode.pre_contract_tp);
-        gatherNode['s_' + "pre_qc_qty"] = helper.add(gatherNode['s_' + "pre_qc_qty"], sourceNode.pre_qc_qty);
-        gatherNode['s_' + "pre_qc_tp"] = helper.add(gatherNode['s_' + "pre_qc_tp"], sourceNode.pre_qc_tp);
-        gatherNode['s_' + "pre_gather_qty"] = helper.add(gatherNode['s_' + "pre_gather_qty"], sourceNode.pre_gather_qty);
-        gatherNode['s_' + "pre_gather_tp"] = helper.add(gatherNode['s_' + "pre_gather_tp"], sourceNode.pre_gather_tp);
-
-        gatherNode['s_' + "end_contract_qty"] = helper.add(gatherNode['s_' + "end_contract_qty"], sourceNode.end_contract_qty);
-        gatherNode['s_' + "end_contract_tp"] = helper.add(gatherNode['s_' + "end_contract_tp"], sourceNode.end_contract_tp);
-        gatherNode['s_' + "end_qc_qty"] = helper.add(gatherNode['s_' + "end_qc_qty"], sourceNode.end_qc_qty);
-        gatherNode['s_' + "end_qc_tp"] = helper.add(gatherNode['s_' + "end_qc_tp"], sourceNode.end_qc_tp);
-        gatherNode['s_' + "end_gather_qty"] = helper.add(gatherNode['s_' + "end_gather_qty"], sourceNode.end_gather_qty);
-        gatherNode['s_' + "end_gather_tp"] = helper.add(gatherNode['s_' + "end_gather_tp"], sourceNode.end_gather_tp);
-    },
-    gatherZone: function (tender, gatherNode, sourceNode, prefix, helper) {
-        gatherNode[prefix + 'id'] = tender.id;
-        gatherNode[prefix + 'name'] = tender.name;
-
-        gatherNode[prefix + "qty"] = helper.add(gatherNode[prefix + "qty"], sourceNode.quantity);
-        gatherNode[prefix + "tp"] = helper.add(gatherNode[prefix + "tp"], sourceNode.total_price);
-
-        gatherNode[prefix + "dgn_qty1"] = helper.add(gatherNode[prefix + "dgn_qty1"], sourceNode.dgn_qty1);
-        gatherNode[prefix + "dgn_qty2"] = helper.add(gatherNode[prefix + "dgn_qty2"], sourceNode.dgn_qty2);
-
-        gatherNode[prefix + "contract_qty"] = helper.add(gatherNode[prefix + "contract_qty"], sourceNode.contract_qty);
-        gatherNode[prefix + "contract_tp"] = helper.add(gatherNode[prefix + "contract_tp"], sourceNode.contract_tp);
-        gatherNode[prefix + "qc_qty"] = helper.add(gatherNode[prefix + "qc_qty"], sourceNode.qc_qty);
-        gatherNode[prefix + "qc_tp"] = helper.add(gatherNode[prefix + "qc_tp"], sourceNode.qc_tp);
-        gatherNode[prefix + "gather_qty"] = helper.add(gatherNode[prefix + "gather_qty"], sourceNode.gather_qty);
-        gatherNode[prefix + "gather_tp"] = helper.add(gatherNode[prefix + "gather_tp"], sourceNode.gather_tp);
-
-        gatherNode[prefix + "deal_dgn_qty1"] = helper.add(gatherNode[prefix + "deal_dgn_qty1"], sourceNode.deal_dgn_qty1);
-        gatherNode[prefix + "deal_dgn_qty2"] = helper.add(gatherNode[prefix + "deal_dgn_qty2"], sourceNode.deal_dgn_qty2);
-        gatherNode[prefix + "c_dgn_qty1"] = helper.add(gatherNode[prefix + "c_dgn_qty1"], sourceNode.c_dgn_qty1);
-        gatherNode[prefix + "c_dgn_qty2"] = helper.add(gatherNode[prefix + "c_dgn_qty2"], sourceNode.c_dgn_qty2);
-
-        gatherNode['s_' + "qty"] = helper.add(gatherNode['s_' + "qty"], sourceNode.quantity);
-        gatherNode['s_' + "tp"] = helper.add(gatherNode['s_' + "tp"], sourceNode.total_price);
-
-        gatherNode['s_' + "contract_qty"] = helper.add(gatherNode['s_' + "contract_qty"], sourceNode.contract_qty);
-        gatherNode['s_' + "contract_tp"] = helper.add(gatherNode['s_' + "contract_tp"], sourceNode.contract_tp);
-        gatherNode['s_' + "qc_qty"] = helper.add(gatherNode['s_' + "qc_qty"], sourceNode.qc_qty);
-        gatherNode['s_' + "qc_tp"] = helper.add(gatherNode['s_' + "qc_tp"], sourceNode.qc_tp);
-        gatherNode['s_' + "gather_qty"] = helper.add(gatherNode['s_' + "gather_qty"], sourceNode.gather_qty);
-        gatherNode['s_' + "gather_tp"] = helper.add(gatherNode['s_' + "gather_tp"], sourceNode.gather_tp);
-    },
-    gatherLedger: function (tender, gatherNode, sourceNode, prefix, helper) {
-        gatherNode[prefix + 'id'] = tender.id;
-        gatherNode[prefix + 'name'] = tender.name;
-
-        gatherNode[prefix + "qty"] = helper.add(gatherNode[prefix + "qty"], sourceNode.quantity);
-        gatherNode[prefix + "tp"] = helper.add(gatherNode[prefix + "tp"], sourceNode.total_price);
-
-        gatherNode[prefix + "dgn_qty1"] = helper.add(gatherNode[prefix + "dgn_qty1"], sourceNode.dgn_qty1);
-        gatherNode[prefix + "dgn_qty2"] = helper.add(gatherNode[prefix + "dgn_qty2"], sourceNode.dgn_qty2);
-
-        gatherNode['s_' + "qty"] = helper.add(gatherNode['s_' + "qty"], sourceNode.quantity);
-        gatherNode['s_' + "tp"] = helper.add(gatherNode['s_' + "tp"], sourceNode.total_price);
-    },
-    gatherSpecial: function (gatherNode, sourceNode, prefix, helper) {
-        gatherNode[prefix + "qty"] = helper.add(gatherNode[prefix + "qty"], sourceNode.quantity);
-        gatherNode[prefix + "tp"] = helper.add(gatherNode[prefix + "tp"], sourceNode.total_price);
-
-        gatherNode[prefix + "dgn_qty1"] = helper.add(gatherNode[prefix + "dgn_qty1"], sourceNode.dgn_qty1);
-        gatherNode[prefix + "dgn_qty2"] = helper.add(gatherNode[prefix + "dgn_qty2"], sourceNode.dgn_qty2);
-    },
-};
 
 module.exports = app => {
     class RptStageSumMemory extends app.BaseService {
@@ -163,7 +35,6 @@ module.exports = app => {
             const billsData = await this.ctx.service.ledger.getData(this.ctx.tender.id);
             const calcFields = ['deal_tp', 'total_price'], calcPrefix = [];
 
-            const gsSetting = JSON.parse(gsDefine.setting);
             for (const s of gsCustom.stages) {
                 const stage = await this.db.get(this.ctx.service.stage.tableName, { tid: this.ctx.tender.id, order: s });
                 if (!stage) continue;
@@ -180,8 +51,10 @@ module.exports = app => {
                 const curStage = stage.readOnly
                     ? await this.ctx.service.stageBills.getAuditorStageData2(this.ctx.tender.id, stage.id, stage.curTimes, stage.curOrder)
                     : await this.ctx.service.stageBills.getLastestStageData2(this.ctx.tender.id, stage.id);
+                const bpcStage = await this.ctx.service.stageBillsPc.getAllDataByCondition({ where: { sid: stage.id } });
                 this.ctx.helper.assignRelaData(billsData, [
-                    {data: curStage, fields: ['contract_qty', 'contract_tp', 'contract_expr', 'qc_qty', 'qc_tp'], prefix: prefix, relaId: 'lid', defaultData}
+                    {data: curStage, fields: ['contract_qty', 'contract_tp', 'contract_expr', 'qc_qty', 'qc_tp'], prefix: prefix, relaId: 'lid', defaultData},
+                    {data: bpcStage, fields: ['contract_pc_tp', 'qc_pc_tp', 'pc_tp'], prefix: prefix, relaId: 'lid', defaultData},
                 ]);
             }
 
@@ -199,7 +72,7 @@ module.exports = app => {
                         if (node.children && node.children.length === 0) {
                             node[prefix + 'gather_qty'] = self.ctx.helper.add(node[prefix + 'contract_qty'], node[prefix + 'qc_qty']);
                         }
-                        node[prefix + 'gather_tp'] = self.ctx.helper.add(node[prefix + 'contract_tp'], node[prefix + 'qc_tp']);
+                        node[prefix + 'gather_tp'] = self.ctx.helper.sum([node[prefix + 'contract_tp'], node[prefix + 'qc_tp'], node[prefix + 'pc_tp']]);
                     }
                 }
             });

+ 5 - 8
app/service/stage_stash.js

@@ -239,7 +239,11 @@ module.exports = app => {
                 const b = bills.find(x => { return x.id === d.lid });
                 if (!b) continue;
 
-                const nbs = { tid: stage.tid, sid: stage.id, said, lid: b.id, times: 1, order: 0 };
+                const nbs = {
+                    tid: stage.tid, sid: stage.id, said, lid: b.id, times: 1, order: 0,
+                    contract_qty: 0, qc_qty: 0, qc_minus_qty: 0, positive_qc_qty: 0, negative_qc_qty: 0,
+                    contract_tp: 0, qc_tp: 0, positive_qc_tp: 0, negative_qc_tp: 0
+                };
                 if (d.pos) {
                     for (const bp of d.pos) {
                         const p = pos.find(x => { return x.id === bp.pid});
@@ -283,17 +287,10 @@ module.exports = app => {
                     nbs.negative_qc_tp = this.ctx.helper.mul(nbs.negative_qc_qty, b.unit_price, decimal.tp);
                 } else {
                     if (b.is_tp) {
-                        nbs.contract_qty = 0;
                         nbs.contract_tp = this.ctx.helper.round(d.contract_tp, decimal.tp);
-                        nbs.qc_qty = 0;
-                        nbs.qc_tp = 0;
                     } else {
                         nbs.contract_qty = this.ctx.helper.round(d.contract_qty, decimal.qty);
                         nbs.contract_tp = this.ctx.helper.mul(nbs.contract_qty, b.unit_price, decimal.tp);
-                        nbs.qc_qty = 0;
-                        nbs.qc_minus_qty = 0;
-                        nbs.positive_qc_qty = 0;
-                        nbs.negative_qc_qty = 0;
                         if (d.change) {
                             for (const c of d.change) {
                                 if (!c.qty) continue;

+ 1 - 1
app/view/budget/compare.ejs

@@ -79,7 +79,7 @@
                 <div class="d-inline-block">
                     <div class="dropdown">
                         <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="dp-cover" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-                            <i class="fa fa-list-ol"></i> 图表样式
+                            <i class="fa fa-exchange"></i> 图表样式
                         </button>
                         <div class="dropdown-menu" aria-labelledby="dp-cover">
                             <a class="dropdown-item" name="stackedBarCover" tag="0" href="javascript: void(0);">堆叠</a>

+ 1 - 0
app/view/report/rpt_individual.ejs

@@ -10,6 +10,7 @@
     <script type="text/javascript" src="/public/report/js/jpc_output.js"></script>
     <script type="text/javascript" src="/public/js/string_util_light.js"></script>
     <script type="text/javascript" src="/public/report/js/rpt_signature.js"></script>
+    <script type="text/javascript" src="/public/report/js/rpt_move_signature.js"></script>
     <script type="text/javascript" src="/public/report/js/rpt_jspdf.js"></script>
     <!--
     <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">

+ 4 - 1
publish.md

@@ -10,8 +10,11 @@
 ##特殊操作
 如果没有特殊说明,则在第默认操作的第3步前,执行相关脚本,如果有特殊要求,需特别说明
 
+### V3.5.xxx
+2023-02-12 ~ ...(uat) ~ ...(prod)
+
 ### V3.5.28.0227
-2022-1024 ~ 2023-02-07(uat) ~ 2023-02-12 prod
+2022-10-24 ~ 2023-02-07(uat) ~ 2023-02-12 prod
 3.1 pay:
     - 重算所有合同支付项order
 #### uat