Bläddra i källkod

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

TonyKang 5 år sedan
förälder
incheckning
c4943104f3

+ 7 - 4
app/controller/revise_controller.js

@@ -350,13 +350,16 @@ module.exports = app => {
                 const revise = await ctx.service.ledgerRevise.getLastestRevise(ctx.tender.id);
                 if (!revise) throw '台账修订数据有误';
 
-                const reviseBills = revise.bills_file
-                    ? JSON.parse(await fs.readFileSync(this.ctx.app.config.filePath + revise.bills_file, 'utf8'))
+                const billsFile = revise.bills_file ? this.ctx.app.config.filePath + revise.bills_file : undefined;
+                const reviseBills = billsFile && fs.existsSync(billsFile)
+                    ? JSON.parse(await fs.readFileSync(billsFile, 'utf8'))
                     : await ctx.service.reviseBills.getData(ctx.tender.id);
 
-                const revisePos = revise.pos_file
-                    ? JSON.parse(await fs.readFileSync(this.ctx.app.config.filePath + revise.pos_file, 'utf8'))
+                const posFile = revise.pos_file ? this.ctx.app.config.filePath + revise.pos_file : undefined;
+                const revisePos = posFile && fs.existsSync(posFile)
+                    ? JSON.parse(await fs.readFileSync(posFile, 'utf8'))
                     : await ctx.service.revisePos.getData(ctx.tender.id);
+
                 if (revise.uid === ctx.session.sessionUser.accountId &&
                     (revise.status === audit.revise.status.uncheck || revise.status === audit.revise.status.checkNo)) {                    
                     const lastStage = await ctx.service.stage.getLastestStage(ctx.tender.id, true);

+ 1 - 0
app/lib/analysis_excel.js

@@ -249,6 +249,7 @@ class ImportBaseTree {
             pos.add_user = this.ctx.session.sessionUser.accountId;
             this.finalNode.pos.push(pos);
             this.pos.push(pos);
+            pos.sgfh_qty = this.ctx.helper.round(pos.sgfh_qty, this.finalPrecision.value);
             pos.quantity = this.ctx.helper.round(pos.quantity, this.finalPrecision.value);
             return pos;
         }

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 565 - 491
app/public/css/main.css


+ 17 - 7
app/public/js/ledger.js

@@ -281,6 +281,7 @@ $(document).ready(function() {
                 const refreshNode = tree.loadPostData(result);
                 self.refreshTree(sheet, refreshNode);
                 sheet.setSelection(refreshNode.create[0].index, sel.col, sel.rowCount, sel.colCount);
+                SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                 self.refreshOperationValid(sheet);
             });
         },
@@ -328,6 +329,7 @@ $(document).ready(function() {
                     self.refreshTree(sheet, refreshNode);
                     const sel = sheet.getSelections()[0];
                     sheet.setSelection(tree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
+                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                     self.refreshOperationValid(sheet);
                 });
             }
@@ -352,6 +354,7 @@ $(document).ready(function() {
                     self.refreshTree(sheet, refreshNode);
                     const sel = sheet.getSelections()[0];
                     sheet.setSelection(tree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
+                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                     self.refreshOperationValid(sheet);
                 });
             }
@@ -734,16 +737,12 @@ $(document).ready(function() {
                 const result = tree.loadPostData(data.ledger);
                 self.refreshTree(sheet, result);
                 sheet.setSelection(result.create[0].index, sel.col, sel.rowCount, sel.colCount);
+                SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                 self.refreshOperationValid(sheet);
                 removeLocalCache(copyBlockTag);
             }, null, true);
         },
         selectionChanged: function (e, info) {
-            const rows = [];
-            if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-            if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-            if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-
             if (!info.oldSelections[0] || info.newSelections[0].row !== info.oldSelections[0].row) {
                 posOperationObj.loadCurPosData();
                 SpreadJsObj.resetTopAndSelect(posSpread.getActiveSheet());
@@ -863,6 +862,7 @@ $(document).ready(function() {
     sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
     ledgerTreeCol.initSpreadSetting(ledgerSpreadSetting);
     SpreadJsObj.initSheet(ledgerSpread.getActiveSheet(), ledgerSpreadSetting);
+    SpreadJsObj.selChangedRefreshBackColor(ledgerSpread.getActiveSheet());
     // 绑定事件
     ledgerSpread.bind(GC.Spread.Sheets.Events.SelectionChanged, treeOperationObj.selectionChanged);
     ledgerSpread.bind(spreadNS.Events.TopRowChanged, treeOperationObj.topRowChanged);
@@ -1285,8 +1285,10 @@ $(document).ready(function() {
                             if (refreshNode.create[0]) {
                                 if (sel && sel[0]) {
                                     ledgerSheet.setSelection(refreshNode.create[0].index, sel[0].col, sel[0].rowCount, sel[0].colCount);
+                                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                                 } else {
                                     ledgerSheet.setSelection(refreshNode.create[0].index, 0, 1, 1);
+                                    SpreadJsObj.reloadRowsBackColor(sheet, [refreshNode.create[0].index]);
                                 }
                             }
                             treeOperationObj.refreshOperationValid(ledgerSheet);
@@ -1784,10 +1786,12 @@ $(document).ready(function() {
             treeOperationObj.refreshTree(mainSheet, refreshNode);
             if (refreshNode.create && refreshNode.create.length > 0) {
                 mainSheet.setSelection(refreshNode.create[refreshNode.create.length - 1].index, sel.col, sel.rowCount, sel.colCount);
+                SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[refreshNode.create.length - 1].index]);
             } else {
                 const node = _.find(ledgerTree.nodes, {code: stdNode.code, name: stdNode.name});
                 if (node) {
                     mainSheet.setSelection(ledgerTree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
+                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, ledgerTree.nodes.indexOf(node)]);
                 }
             }
             treeOperationObj.refreshOperationValid(mainSheet);
@@ -1820,6 +1824,7 @@ $(document).ready(function() {
             headerFont: '12px 微软雅黑',
             font: '12px 微软雅黑',
             headColWidth: [0],
+            selectedBackColor: '#fffacd',
         },
         cellDoubleClick: stdLibCellDoubleClick,
         page: 'ledger',
@@ -1850,6 +1855,7 @@ $(document).ready(function() {
             headerFont: '12px 微软雅黑',
             font: '12px 微软雅黑',
             headColWidth: [0],
+            selectedBackColor: '#fffacd',
         },
         cellDoubleClick: stdLibCellDoubleClick,
         page: 'ledger',
@@ -1920,6 +1926,7 @@ $(document).ready(function() {
                         headerFont: '12px 微软雅黑',
                         font: '12px 微软雅黑',
                         headColWidth: [0],
+                        selectedBackColor: '#fffacd',
                     });
                     dealBills.loadData();
                 }
@@ -1944,6 +1951,7 @@ $(document).ready(function() {
                             defaultRowHeight: 21,
                             headerFont: '12px 微软雅黑',
                             font: '12px 微软雅黑',
+                            selectedBackColor: '#fffacd',
                         },
                         afterLocated: function () {
                             posOperationObj.loadCurPosData();
@@ -2001,6 +2009,7 @@ $(document).ready(function() {
                     treeOperationObj.refreshTree(mainSheet, refreshData);
                     const sel = mainSheet.getSelections()[0];
                     mainSheet.setSelection(refreshData.create[0].index, sel.col, sel.rowCount, sel.colCount);
+                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                     treeOperationObj.refreshOperationValid(mainSheet);
                     ledgerSpread.focus();
                     posOperationObj.loadCurPosData();
@@ -2080,9 +2089,9 @@ $(document).ready(function() {
             this.dealSpreadSetting = {
                 cols: [
                     {title: '清单编号', field: 'code', width: 80, hAlign: 0, formatter: '@', readOnly: true},
-                    {title: '名称', field: 'name', width: 120, hAlign: 0, formatter: '@', readOnly: true},
+                    {title: '名称', field: 'name', width: 230, hAlign: 0, formatter: '@', readOnly: true},
                     {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
-                    {title: '单价', field: 'unit_price', hAlign: 2, width: 50, readOnly: true},
+                    {title: '单价', field: 'unit_price', hAlign: 2, width: 60, readOnly: true},
                 ],
                 emptyRows: 0,
                 headRows: 1,
@@ -2210,6 +2219,7 @@ $(document).ready(function() {
                             const result = ledgerTree.loadPostData(data.ledger);
                             treeOperationObj.refreshTree(sheet, result);
                             sheet.setSelection(result.create[0].index, sel.col, sel.rowCount, sel.colCount);
+                            SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshNode.create[0].index]);
                             treeOperationObj.refreshOperationValid(sheet);
                             self.obj.modal('hide');
                         }, null, true);

+ 2 - 5
app/public/js/ledger_audit.js

@@ -99,11 +99,6 @@ $(document).ready(() => {
     }, null, true);
 
     ledgerSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
-        const rows = [];
-        if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-        if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-        if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-        
         loadCurPosData();
         SpreadJsObj.saveTopAndSelect(info.sheet, ckBillsSpread);
         posSearch.search($('#pos-keyword').val());
@@ -174,6 +169,7 @@ $(document).ready(() => {
                     headerFont: '12px 微软雅黑',
                     font: '12px 微软雅黑',
                     headColWidth: [0],
+                    selectedBackColor: '#fffacd',
                 });
                 dealBills.loadData();
             } else if (tab.attr('content') === '#search' && !searchLedger) {
@@ -196,6 +192,7 @@ $(document).ready(() => {
                             defaultRowHeight: 21,
                             headerFont: '12px 微软雅黑',
                             font: '12px 微软雅黑',
+                            selectedBackColor: '#fffacd',
                         },
                         afterLocated: function () {
                             loadCurPosData();

+ 0 - 5
app/public/js/measure_compare.js

@@ -163,11 +163,6 @@ $(document).ready(() => {
         SpreadJsObj.resetTopAndSelect(posSheet);
     }
     billsSheet.bind(spreadNS.Events.SelectionChanged, function (e, info) {
-        const rows = [];
-        if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-        if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-        if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-
         if (info.newSelections) {
             const iNewRow = info.newSelections[0].row;
             if (info.oldSelections) {

+ 16 - 7
app/public/js/revise.js

@@ -224,11 +224,6 @@ $(document).ready(() => {
             });
         },
         selectionChanged: function (e, info) {
-            const rows = [];
-            if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-            if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-            if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-
             if (info.newSelections) {
                 if (!info.oldSelections || info.newSelections[0].row !== info.oldSelections[0].row) {
                     billsTreeSpreadObj.refreshOperationValid(info.sheet);
@@ -305,11 +300,13 @@ $(document).ready(() => {
                     const sel = sheet.getSelections()[0];
                     if (sel) {
                         sheet.setSelection(tree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
+                        SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, tree.nodes.indexOf(node)]);
                     }
                 } else if (type === 'add') {
                     const sel = sheet.getSelections()[0];
                     if (sel) {
                         sheet.setSelection(tree.nodes.indexOf(refreshData.create[0]), sel.col, sel.rowCount, sel.colCount);
+                        SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, tree.nodes.indexOf(refreshData.create[0])]);
                     }
                 }
                 self.refreshOperationValid(sheet);
@@ -639,6 +636,7 @@ $(document).ready(() => {
                 const sel = sheet.getSelections()[0];
                 if (sel) {
                     sheet.setSelection(tree.nodes.indexOf(refreshData.create[0]), sel.col, sel.rowCount, sel.colCount);
+                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, tree.nodes.indexOf(refreshData.create[0])]);
                 }
                 self.refreshOperationValid(sheet);
                 removeLocalCache(copyBlockTag);
@@ -986,8 +984,10 @@ $(document).ready(() => {
                                     if (refreshNode.create[0]) {
                                         if (sel && sel[0]) {
                                             billsSheet.setSelection(refreshNode.create[0].index, sel[0].col, sel[0].rowCount, sel[0].colCount);
+                                            SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshData.create[0].index]);
                                         } else {
                                             billsSheet.setSelection(refreshNode.create[0].index, 0, 1, 1);
+                                            SpreadJsObj.reloadRowsBackColor(sheet, [refreshData.create[0].index]);
                                         }
                                     }
                                     billsTreeSpreadObj.refreshOperationValid(billsSheet);
@@ -1465,6 +1465,7 @@ $(document).ready(() => {
                         const sel = mainSheet.getSelections()[0];
                         if (sel && refreshData.create[0]) {
                             mainSheet.setSelection(mainTree.nodes.indexOf(refreshData.create[0]), sel.col, sel.rowCount, sel.colCount);
+                            SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, mainTree.nodes.indexOf(refreshData.create[0])]);
                         }
                         billsTreeSpreadObj.refreshOperationValid(mainSheet);
                         billsSpread.focus();
@@ -1535,6 +1536,7 @@ $(document).ready(() => {
                         const sel = mainSheet.getSelections()[0];
                         if (sel && refreshData.create[0]) {
                             mainSheet.setSelection(mainTree.nodes.indexOf(refreshData.create[0]), sel.col, sel.rowCount, sel.colCount);
+                            SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, mainTree.nodes.indexOf(refreshData.create[0])]);
                         }
                         billsTreeSpreadObj.refreshOperationValid(mainSheet);
                         billsSpread.focus();
@@ -1598,9 +1600,9 @@ $(document).ready(() => {
             this.dealSpreadSetting = {
                 cols: [
                     {title: '清单编号', field: 'code', width: 80, hAlign: 0, formatter: '@', readOnly: true},
-                    {title: '名称', field: 'name', width: 120, hAlign: 0, formatter: '@', readOnly: true},
+                    {title: '名称', field: 'name', width: 230, hAlign: 0, formatter: '@', readOnly: true},
                     {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
-                    {title: '单价', field: 'unit_price', hAlign: 2, width: 50, readOnly: true},
+                    {title: '单价', field: 'unit_price', hAlign: 2, width: 60, readOnly: true},
                 ],
                 emptyRows: 0,
                 headRows: 1,
@@ -1803,6 +1805,7 @@ $(document).ready(() => {
         defaultRowHeight: 21,
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
+        selectedBackColor: '#fffacd',
     });
     const bgBills = new BgBills('#bg-bills-spread', {
         cols: [
@@ -1819,6 +1822,7 @@ $(document).ready(() => {
         defaultRowHeight: 21,
         headerFont: '12px 微软雅黑',
         font: '12px 微软雅黑',
+        selectedBackColor: '#fffacd',
     });
 
     $.divResizer({
@@ -1946,10 +1950,12 @@ $(document).ready(() => {
             if (sel) {
                 if (refreshNode.create && refreshNode.create.length > 0) {
                     mainSheet.setSelection(refreshNode.create[refreshNode.create.length - 1].index, sel.col, sel.rowCount, sel.colCount);
+                    SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, refreshData.create[refreshNode.create.length - 1]]);
                 } else {
                     const node = _.find(mainTree.nodes, {code: stdNode.code, name: stdNode.name});
                     if (node) {
                         mainSheet.setSelection(mainTree.nodes.indexOf(node), sel.col, sel.rowCount, sel.colCount);
+                        SpreadJsObj.reloadRowsBackColor(sheet, [sel.row, mainTree.nodes.indexOf(node)]);
                     }
                 }
             }
@@ -1983,6 +1989,7 @@ $(document).ready(() => {
             headerFont: '12px 微软雅黑',
             font: '12px 微软雅黑',
             headColWidth: [0],
+            selectedBackColor: '#fffacd',
         },
         cellDoubleClick: stdLibCellDoubleClick,
         page: 'revise',
@@ -2013,6 +2020,7 @@ $(document).ready(() => {
             headerFont: '12px 微软雅黑',
             font: '12px 微软雅黑',
             headColWidth: [0],
+            selectedBackColor: '#fffacd',
         },
         cellDoubleClick: stdLibCellDoubleClick,
         page: 'revise',
@@ -2066,6 +2074,7 @@ $(document).ready(() => {
                             defaultRowHeight: 21,
                             headerFont: '12px 微软雅黑',
                             font: '12px 微软雅黑',
+                            selectedBackColor: '#fffacd',
                         },
                         afterLocated: function () {
                             posSpreadObj.loadCurPosData();

+ 1 - 5
app/public/js/revise_history.js

@@ -117,11 +117,6 @@ $(document).ready(() => {
             });
         },
         selectionChanged: function (e, info) {
-            const rows = [];
-            if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-            if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-            if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-
             if (info.newSelections) {
                 if (!info.oldSelections || info.newSelections[0].row !== info.oldSelections[0].row) {
                     SpreadJsObj.saveTopAndSelect(billsSheet, ckBillsSpread);
@@ -244,6 +239,7 @@ $(document).ready(() => {
                             defaultRowHeight: 21,
                             headerFont: '12px 微软雅黑',
                             font: '12px 微软雅黑',
+                            selectedBackColor: '#fffacd',
                         },
                         afterLocated: function () {
                             posSpreadObj.loadCurPosData();

+ 8 - 7
app/public/js/shares/sjs_setting.js

@@ -3,6 +3,7 @@ const sjsSettingObj = (function () {
         jz: 'jianzhu',
     }
     const setJzFxTreeStyle = function (setting) {
+        setting.selectedBackColor = '#fffacd';
         setting.tree = {
             getFont: function (sheet, data, row, col, defaultFont) {
                 if (sheet.zh_tree && data.level === 1) {
@@ -12,12 +13,8 @@ const sjsSettingObj = (function () {
                 }
             },
             getColor: function (sheet, data, row, col, defaultColor) {
-                const sel = sheet.getSelections();
-                const curRow = sel && sel[0] ? sel[0].row : -1;
                 if (sheet.zh_tree) {
-                    if (curRow === row) {
-                        return '#fffacd';
-                    } else if (data.level === 2) {
+                    if (data.level === 2) {
                         return '#C4CAFB';
                     } else if ((!data.b_code || data.b_code === '') && data.level > 2) {
                         return '#DFE8F9';
@@ -36,6 +33,10 @@ const sjsSettingObj = (function () {
                 setJzFxTreeStyle(setting);
                 break;
         }
-    }
-    return {setFxTreeStyle, FxTreeStyle};
+    };
+
+    const setGridSelectStyle = function (setting) {
+        setting.selectedBackColor = '#fffacd';
+    };
+    return {setFxTreeStyle, FxTreeStyle, setGridSelectStyle};
 })();

+ 29 - 18
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -237,6 +237,14 @@ const SpreadJsObj = {
             }
         });
     },
+    selChangedRefreshBackColor: function (sheet) {
+        sheet.bind(spreadNS.Events.SelectionChanged, function (e, info) {
+            const rows = [];
+            if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
+            if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
+            if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
+        });
+    },
     /**
      * 获取写入sheet的数据序列
      * data:sheet.zh_data, tree: sheet.zh_tree.nodes
@@ -354,6 +362,9 @@ const SpreadJsObj = {
         sheet.extendCellType = {};
         sheet.borderLine = new spreadNS.LineBorder('#cccccc', spreadNS.LineStyle.thin);
         sheet.getRange(0, 0, sheet.getRowCount(), sheet.getColumnCount()).locked(setting.readOnly).setBorder(sheet.borderLine, {all: true});
+        if (setting.selectedBackColor) {
+            SpreadJsObj.selChangedRefreshBackColor(sheet);
+        }
         this.endMassOperation(sheet);
     },
     reLoadSheetHeader: function (sheet) {
@@ -363,6 +374,21 @@ const SpreadJsObj = {
             this.endMassOperation(sheet);
         }
     },
+    _getBackColor: function (sheet, data, row, col) {
+        let backColor = sheet.getDefaultStyle().backColor;
+        let sels = sheet.getSelections();
+        if (sheet.zh_setting.selectedBackColor && sels && sels[0].row === row ) {
+            return sheet.zh_setting.selectedBackColor;
+        } else {
+            if (sheet.zh_setting.tree.getColor && Object.prototype.toString.apply(sheet.zh_setting.tree.getColor) === "[object Function]") {
+                backColor = sheet.zh_setting.tree.getColor(sheet, data, row, col, backColor);
+            }
+            if (sheet.zh_setting.getColor && Object.prototype.toString.apply(sheet.zh_setting.getColor) === "[object Function]") {
+                backColor = sheet.zh_setting.getColor(sheet, data, row, col, backColor);
+            }
+            return backColor;
+        }
+    },
     _loadRowData: function (sheet, data, row) {
         // 单元格重新写入数据
         if (!data) { return }
@@ -375,7 +401,6 @@ const SpreadJsObj = {
             }
 
             let font = sheet.getDefaultStyle().font;
-            console.log(font);
             if (col.font) {
                 font = col.font;
             }
@@ -404,14 +429,7 @@ const SpreadJsObj = {
                 cell.formatter(SpreadJsObj.Formatter.getNumberFormatter('0.######'));
             }
 
-            let backColor = sheet.getDefaultStyle().backColor;
-            if (sheet.zh_setting.tree.getColor && Object.prototype.toString.apply(sheet.zh_setting.tree.getColor) === "[object Function]") {
-                backColor = sheet.zh_setting.tree.getColor(sheet, data, row, col, backColor);
-            }
-            if (sheet.zh_setting.getColor && Object.prototype.toString.apply(sheet.zh_setting.getColor) === "[object Function]") {
-                backColor = sheet.zh_setting.getColor(sheet, data, row, col, backColor);
-            }
-            cell.backColor(backColor);
+            cell.backColor(SpreadJsObj._getBackColor(sheet, data, row, col));
 
             cell.setBorder(sheet.borderLine, {all: true});
         });
@@ -621,14 +639,7 @@ const SpreadJsObj = {
                 if (row < 0) { continue; }
                 const data = sortData[row];
                 for (const [iCol, col] of sheet.zh_setting.cols.entries()) {
-                    let backColor = sheet.getDefaultStyle().backColor;
-                    if (sheet.zh_setting.tree.getColor && Object.prototype.toString.apply(sheet.zh_setting.tree.getColor) === "[object Function]") {
-                        backColor = sheet.zh_setting.tree.getColor(sheet, data, row, col, backColor);
-                    }
-                    if (sheet.zh_setting.getColor && Object.prototype.toString.apply(sheet.zh_setting.getColor) === "[object Function]") {
-                        backColor = sheet.zh_setting.getColor(sheet, data, row, col, backColor);
-                    }
-                    sheet.getCell(row, iCol).backColor(backColor);
+                    sheet.getCell(row, iCol).backColor(SpreadJsObj._getBackColor(sheet, data, row, col));
                 }
             };
             this.endMassOperation(sheet);
@@ -1625,7 +1636,7 @@ const SpreadJsObj = {
                         if (style.backColor) {
                             canvas.save();
                             canvas.fillStyle = style.backColor;
-                            canvas.fillRect(x + w - indent - img.width, y, img.width, h);
+                            canvas.fillRect(x + w - indent - img.width, y, img.width + indent, h);
                             canvas.restore();
                         }
                         canvas.drawImage(img, x + w - indent - img.width, y + (h - img.height) / 2);

+ 8 - 12
app/public/js/stage.js

@@ -615,11 +615,6 @@ $(document).ready(() => {
             }
         },
         selectionChanged: function (e, info) {
-            const rows = [];
-            if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-            if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-            if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-            
             if (!info.oldSelections || !info.oldSelections[0] || info.newSelections[0].row !== info.oldSelections[0].row) {
                 stagePosSpreadObj.loadCurPosData();
                 SpreadJsObj.resetTopAndSelect(spSpread.getActiveSheet());
@@ -728,6 +723,11 @@ $(document).ready(() => {
                     for (let iCol = 0; iCol < info.cellRange.colCount; iCol++) {
                         const curCol = info.cellRange.col + iCol;
                         const col = info.sheet.zh_setting.cols[curCol];
+                        if (col.field === 'contract_tp') {
+                            if (!node.is_tp) continue;
+                        } else if (col.field === 'contract_qty') {
+                            if (node.is_tp) continue;
+                        }
 
                         if (setting.dgnUpFields.indexOf(col.field) !== -1) {
                             if (node.b_code && node.b_code !== '') continue;
@@ -1542,7 +1542,8 @@ $(document).ready(() => {
                 defaultRowHeight: 21,
                 headerFont: '12px 微软雅黑',
                 font: '12px 微软雅黑',
-                readOnly: true
+                readOnly: true,
+                selectedBackColor: '#fffacd',
             };
             this.spread = SpreadJsObj.createNewSpread($('#search-result', this.obj)[0]);
             SpreadJsObj.initSheet(this.spread.getActiveSheet(), this.spreadSetting);
@@ -1827,6 +1828,7 @@ $(document).ready(() => {
                 headerFont: '12px 微软雅黑',
                 font: '12px 微软雅黑',
                 readOnly: readOnly,
+                selectedBackColor: '#fffacd',
             };
             this.spread = SpreadJsObj.createNewSpread(obj[0]);
             this.sheet = this.spread.getActiveSheet();
@@ -2202,12 +2204,6 @@ $(document).ready(() => {
                             }
                         }
                     });
-                    self.gsSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
-                        const rows = [];
-                        if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-                        if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-                        if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-                    });
                     const gatherNodes = stage.im_gather_node ? _.map(stage.im_gather_node.split(',')) : [];
                     for (const node of self.gsTree.datas) {
                         node.check = gatherNodes.indexOf(node.id + '') !== -1;

+ 4 - 1
app/public/js/stage_bwtz.js

@@ -13,6 +13,7 @@ $(document).ready(() => {
     autoFlashHeight();
     const xmjSpread = SpreadJsObj.createNewSpread($('#xmj-spread')[0]);
     const xmjSheet = xmjSpread.getActiveSheet();
+    sjsSettingObj.setFxTreeStyle(xmjSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
     SpreadJsObj.initSheet(xmjSheet, xmjSpreadSetting);
 
     const unitSpread = SpreadJsObj.createNewSpread($('#unit-spread')[0]);
@@ -29,7 +30,9 @@ $(document).ready(() => {
             }
         }
     };
-    xmjSpread.bind(spreadNS.Events.SelectionChanged, unitTreeObj.loadCurUnitData);
+    xmjSpread.bind(spreadNS.Events.SelectionChanged, function (e, info) {
+        unitTreeObj.loadCurUnitData();
+    });
 
     postData(preUrl + '/load', { filter: 'ledger;pos;change' }, function (result) {
         billsPosConvertModel.loadData(result.ledgerData, result.posData, result.changeData, decimal);

+ 4 - 1
app/public/js/stage_change.js

@@ -35,6 +35,7 @@ class ChangeAnalysis {
         change.attachments = change.detail.attachments;
         change.bills = change.detail.bills;
         for (const b of change.bills) {
+            console.log(b);
             const aub = change.detail.addUsedBills.find(function (x) {
                 return x.id === b.id;
             });
@@ -54,6 +55,7 @@ class ChangeAnalysis {
                     p.leaf_xmj_code = leafXmj.code;
                     p.leaf_xmj_name = leafXmj.name;
                 }
+                p.f_qty = p.p_qty ? p.p_qty : p.l_qty;
                 b.cur_qty = ZhCalc.add(b.cur_qty, p.qty);
             }
 
@@ -102,6 +104,7 @@ $(document).ready(() => {
             {title: '金额', colSpan: '1', rowSpan: '1', field: 'tp', hAlign: 2, width: 60, formatter: '@', readOnly: true},
             {title: '已变更', colSpan: '1', rowSpan: '1', field: 'used_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
             {title: '未变更', colSpan: '1', rowSpan: '1', field: 'valid_qty', hAlign: 2, width: 60, formatter: '@', readOnly: true},
+            {title: '变更部位', colSpan: '1', rowSpan: '1', field: 'bwmx', hAlign: 0, width: 100, formatter: '@', readOnly: true},
         ],
         emptyRows: 0,
         headRows: 1,
@@ -118,7 +121,7 @@ $(document).ready(() => {
             {title: '相关台账|项目节编号', colSpan: '5|1', rowSpan: '1|1', field: 'leaf_xmj_code', hAlign: 0, width: 120, formatter: '@', readOnly: true},
             {title: '|名称', colSpan: '|1', rowSpan: '1', field: 'leaf_xmj_name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
             {title: '|计量单元', colSpan: '|1', rowSpan: '1', field: 'p_name', hAlign: 0, width: 150, type: 'Number', readOnly: true},
-            {title: '|0号台帐数量', colSpan: '|1', rowSpan: '1', field: 'l_qty', hAlign: 2, width: 80, formatter: '@', readOnly: true},
+            {title: '|0号台帐数量', colSpan: '|1', rowSpan: '1', field: 'f_qty', hAlign: 2, width: 80, formatter: '@', readOnly: true},
             {title: '|本期变更数量', colSpan: '|1', rowSpan: '1', field: 'qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
         ],
         emptyRows: 0,

+ 1 - 5
app/public/js/stage_compare.js

@@ -84,6 +84,7 @@ $(document).ready(function () {
     };
     // 初始化台账
     const ledgerSpread = SpreadJsObj.createNewSpread($('#ledger-spread')[0]);
+    sjsSettingObj.setFxTreeStyle(ledgerSpreadSetting, sjsSettingObj.FxTreeStyle.jz);
     SpreadJsObj.initSheet(ledgerSpread.getActiveSheet(), ledgerSpreadSetting);
     // 初始化部位
     const posSpread = SpreadJsObj.createNewSpread($('#pos-spread')[0]);
@@ -173,11 +174,6 @@ $(document).ready(function () {
     }
     // 切换清单行,读取所属项目节数据
     ledgerSpread.getActiveSheet().bind(spreadNS.Events.SelectionChanged, function (e, info) {
-        const rows = [];
-        if (info.oldSelections && info.oldSelections[0]) rows.push(info.oldSelections[0].row);
-        if (info.newSelections && info.newSelections[0]) rows.push(info.newSelections[0].row);
-        if (rows.length > 0) SpreadJsObj.reloadRowsBackColor(info.sheet, rows);
-        
         if (info.newSelections) {
             const iNewRow = info.newSelections[0].row;
             if (info.oldSelections) {

+ 36 - 7
app/public/js/tender_list.js

@@ -438,28 +438,57 @@ $(document).ready(() => {
             const node = findTenderTreeNode(parseInt(cid), tenderTree);
             doTrStatus(returnItem, 'show');
         }
+    });
+    
+    // 一键展开和收起
+    $('body').on('click', '.tree-toggle', function () {
+        const item = $(this).attr('data-item');
+        for (const tree of tenderTree) {
+            if (tree && tree.sort_id !== undefined) {
+                const cid = tree.sort_id;
+                const node = findTenderTreeNode(parseInt(cid), tenderTree);
+                console.log(node);
+                console.log(returnItem);
+                if (item === 'open') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
+                    doTrStatus(returnItem, 'show', 'all');
+                } else if (item === 'hide') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
+                    doTrStatus(returnItem, 'hide', 'all')
+                }
+            }
+        }
     })
 });
 
-function doTrStatus(node, status) {
+function doTrStatus(node, status, all = '') {
     if (status === 'show') {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        }
     } else {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
+        }
     }
     // 判断是否还有一层
-    if (node.children) {
+    if (node.children && all === '') {
         for (const [index,c] of node.children.entries()) {
             const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
             if (title === '收起') {
                 doTrStatus(c, status);
             }
         }
+    } else if (node.children && all === 'all') {
+        for (const c of node.children) {
+            doTrStatus(c, status, 'all');
+        }
     }
 }
 let returnItem;

+ 36 - 7
app/public/js/tender_list_info.js

@@ -470,28 +470,57 @@ $(document).ready(() => {
             const node = findTenderTreeNode(parseInt(cid), tenderTree);
             doTrStatus(returnItem, 'show');
         }
+    });
+
+    // 一键展开和收起
+    $('body').on('click', '.tree-toggle', function () {
+        const item = $(this).attr('data-item');
+        for (const tree of tenderTree) {
+            if (tree && tree.sort_id !== undefined) {
+                const cid = tree.sort_id;
+                const node = findTenderTreeNode(parseInt(cid), tenderTree);
+                console.log(node);
+                console.log(returnItem);
+                if (item === 'open') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
+                    doTrStatus(returnItem, 'show', 'all');
+                } else if (item === 'hide') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
+                    doTrStatus(returnItem, 'hide', 'all')
+                }
+            }
+        }
     })
 });
 
-function doTrStatus(node, status) {
+function doTrStatus(node, status, all = '') {
     if (status === 'show') {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        }
     } else {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
+        }
     }
     // 判断是否还有一层
-    if (node.children) {
+    if (node.children && all === '') {
         for (const [index,c] of node.children.entries()) {
             const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
             if (title === '收起') {
                 doTrStatus(c, status);
             }
         }
+    } else if (node.children && all === 'all') {
+        for (const c of node.children) {
+            doTrStatus(c, status, 'all');
+        }
     }
 }
 let returnItem;

+ 36 - 7
app/public/js/tender_list_manage.js

@@ -532,28 +532,57 @@ $(document).ready(() => {
             const node = findTenderTreeNode(parseInt(cid), tenderTree);
             doTrStatus(returnItem, 'show');
         }
+    });
+
+    // 一键展开和收起
+    $('body').on('click', '.tree-toggle', function () {
+        const item = $(this).attr('data-item');
+        for (const tree of tenderTree) {
+            if (tree && tree.sort_id !== undefined) {
+                const cid = tree.sort_id;
+                const node = findTenderTreeNode(parseInt(cid), tenderTree);
+                console.log(node);
+                console.log(returnItem);
+                if (item === 'open') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
+                    doTrStatus(returnItem, 'show', 'all');
+                } else if (item === 'hide') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
+                    doTrStatus(returnItem, 'hide', 'all')
+                }
+            }
+        }
     })
 });
 
-function doTrStatus(node, status) {
+function doTrStatus(node, status, all = '') {
     if (status === 'show') {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        }
     } else {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
+        }
     }
     // 判断是否还有一层
-    if (node.children) {
+    if (node.children && all === '') {
         for (const [index,c] of node.children.entries()) {
             const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
             if (title === '收起') {
                 doTrStatus(c, status);
             }
         }
+    } else if (node.children && all === 'all') {
+        for (const c of node.children) {
+            doTrStatus(c, status, 'all');
+        }
     }
 }
 let returnItem;

+ 36 - 7
app/public/js/tender_list_progress.js

@@ -446,28 +446,57 @@ $(document).ready(() => {
             const node = findTenderTreeNode(parseInt(cid), tenderTree);
             doTrStatus(returnItem, 'show');
         }
+    });
+
+    // 一键展开和收起
+    $('body').on('click', '.tree-toggle', function () {
+        const item = $(this).attr('data-item');
+        for (const tree of tenderTree) {
+            if (tree && tree.sort_id !== undefined) {
+                const cid = tree.sort_id;
+                const node = findTenderTreeNode(parseInt(cid), tenderTree);
+                console.log(node);
+                console.log(returnItem);
+                if (item === 'open') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-plus-square-o').addClass('fa-minus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '收起');
+                    doTrStatus(returnItem, 'show', 'all');
+                } else if (item === 'hide') {
+                    $('.c-body tr td span[cid="' + cid + '"]').children('i').removeClass('fa-minus-square-o').addClass('fa-plus-square-o');
+                    $('.c-body tr td span[cid="' + cid + '"]').attr('title', '展开');
+                    doTrStatus(returnItem, 'hide', 'all')
+                }
+            }
+        }
     })
 });
 
-function doTrStatus(node, status) {
+function doTrStatus(node, status, all = '') {
     if (status === 'show') {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').show();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '收起');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-plus-square-o').removeClass('fa-minus-square-o').addClass('fa-minus-square-o');
+        }
     } else {
         $('.c-body').find('tr[pid="'+ node.sort_id +'"]').hide();
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
-        // $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
-
+        if (all === 'all') {
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').attr('title', '展开');
+            $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch i').removeClass('fa-minus-square-o').removeClass('fa-plus-square-o').addClass('fa-plus-square-o');
+        }
     }
     // 判断是否还有一层
-    if (node.children) {
+    if (node.children && all === '') {
         for (const [index,c] of node.children.entries()) {
             const title = $('.c-body').find('tr[pid="'+ node.sort_id +'"] .fold-switch').eq(index).attr('title');
             if (title === '收起') {
                 doTrStatus(c, status);
             }
         }
+    } else if (node.children && all === 'all') {
+        for (const c of node.children) {
+            doTrStatus(c, status, 'all');
+        }
     }
 }
 let returnItem;

+ 6 - 4
app/public/report/js/rpt_signature.js

@@ -180,11 +180,13 @@ let rptSignatureHelper = {
                         elementsStrArr.push('<div class="">');
                         if (role_rel.sign_date !== '') {
                             const dt = new Date(role_rel.sign_date);
-                            const dtVal = dt.Format('yyyy-M-dd');
+                            const dtVal = dt.Format('yyyy-MM-dd');
                             //elementsStrArr.push('<input class="datepicker-here form-control form-control-sm mt-0" placeholder="选择签名日期" data-language="zh" type="text" value="' + (new Date(role_rel.sign_date)).Format('yyyy-M-d') + '">');
-                            elementsStrArr.push('<input id="' + idSuffixStr + '" class="datepicker-here form-control form-control-sm mt-0" placeholder="选择签名日期" data-language="zh" type="text" readonly="true" value="' + dtVal + '"');
+                            // elementsStrArr.push('<input id="' + idSuffixStr + '" class="datepicker-here form-control form-control-sm mt-0" placeholder="选择签名日期" data-language="zh" type="text" readonly="true" value="' + dtVal + '"');
+                            elementsStrArr.push('<input id="' + idSuffixStr + '" class="form-control form-control-sm mt-0" placeholder="选择签名日期" type="date" value="' + dtVal + '"');
                         } else {
-                            elementsStrArr.push('<input id="' + idSuffixStr + '" class="datepicker-here form-control form-control-sm mt-0" placeholder="选择签名日期" data-language="zh" type="text" readonly="true"');
+                            // elementsStrArr.push('<input id="' + idSuffixStr + '" class="datepicker-here form-control form-control-sm mt-0" placeholder="选择签名日期" data-language="zh" type="text" readonly="true"');
+                            elementsStrArr.push('<input id="' + idSuffixStr + '" class="form-control form-control-sm mt-0" placeholder="选择签名日期" type="date"');
                         }
                         elementsStrArr.push('</div>');
 
@@ -495,4 +497,4 @@ let rptSignatureHelper = {
 
 function _getSignDateDftName() {
     return '    年  月  日';
-}
+}

+ 0 - 2
app/service/stage_change.js

@@ -309,8 +309,6 @@ module.exports = app => {
                         '  WHERE cb.cid = ?' +
                         '  GROUP By c.`cbid`';
             const sqlParam = [tid, cid, cid];
-
-            console.log(this.db.format(sql, sqlParam));
             return await this.db.query(sql, sqlParam);
         }
 

+ 4 - 1
app/view/dashboard/index.ejs

@@ -1,10 +1,13 @@
 <div class="panel-content">
     <div class="panel-title fluid">
-        <div class="title-main"><h2><%= ctx.session.sessionProject.name %> 待办事项</h2></div>
+        <div class="title-main"><h2>待办事项</h2></div>
     </div>
     <div class="content-wrap">
         <div class="sjs-height-0">
             <div class="row m-4">
+                <div class="col-12">
+                    <h3 class="mb-2"><%= ctx.session.sessionProject.name %></h3>
+                </div>
                 <% if (!authMobile) { %>
                 <div class="col-12">
                     <div class="alert alert-danger" role="alert">

+ 1 - 1
app/view/ledger/explode_modal.ejs

@@ -49,7 +49,7 @@
 </div>
 <!--批量添加清单部位-->
 <div class="modal fade" id="batch" data-backdrop="static">
-    <div class="modal-dialog modal-lg" role="document">
+    <div class="modal-dialog modal-xl" role="document">
         <div class="modal-content">
             <div class="modal-header">
                 <h5 class="modal-title">批量插入清单-计量单元</h5>

+ 1 - 1
app/view/revise/info_modal.ejs

@@ -1,6 +1,6 @@
 <!--批量添加清单部位-->
 <div class="modal fade" id="batch" data-backdrop="static">
-    <div class="modal-dialog modal-lg" role="document">
+    <div class="modal-dialog modal-xl" role="document">
         <div class="modal-content">
             <div class="modal-header">
                 <h5 class="modal-title">批量插入清单-计量单元</h5>

+ 6 - 1
app/view/tender/manage_modal.ejs

@@ -11,7 +11,12 @@
                     <input class="form-control form-control-sm"  placeholder="输入标段名称" type="text" name="name">
                 </div>
                 <div class="form-group">
-                    <label ><b class="text-danger">*</b>计价规范</label>
+                    <style>
+                        .tooltip-inner {
+                            max-width: initial;
+                        }
+                    </style>
+                    <label ><b class="text-danger">*</b>计价标准<a style="" href="javascript:void(0)" data-toggle="tooltip" data-placement="right" title="" data-original-title="用于初始化新建模板、项目节、标准清单" class="ml-2"><i class="fa fa-info-circle"></i></a></label>
                     <div>
                         <% for (const v of valuations) { %>
                             <div class="form-check form-check-inline mt-2">

+ 6 - 1
app/view/tender/modal.ejs

@@ -11,7 +11,12 @@
                     <input class="form-control form-control-sm"  placeholder="输入标段名称" type="text" name="name">
                 </div>
                 <div class="form-group">
-                    <label ><b class="text-danger">*</b>计价规范</label>
+                    <style>
+                        .tooltip-inner {
+                            max-width: initial;
+                        }
+                    </style>
+                    <label ><b class="text-danger">*</b>计价标准<a style="" href="javascript:void(0)" data-toggle="tooltip" data-placement="right" title="" data-original-title="用于初始化新建模板、项目节、标准清单" class="ml-2"><i class="fa fa-info-circle"></i></a></label>
                     <div>
                         <% for (const v of valuations) { %>
                         <div class="form-check form-check-inline mt-2">

+ 5 - 0
app/view/tender/sub_menu.ejs

@@ -3,6 +3,11 @@
         <div>
             <div class="d-inline-block mr-2">
                 <button href="#cate-set" class="btn btn-sm btn-light" data-toggle="modal" data-target="#cate-set"><i class="fa fa-sitemap fa-rotate-270"></i> 分类</button>
+                <button type="button" class="btn btn-sm btn-light dropdown-toggle" data-toggle="dropdown">展开/收起</button>
+                <div class="dropdown-menu">
+                    <a class="dropdown-item tree-toggle" href="javascript:void(0);" data-item="open">展开所有</a>
+                    <a class="dropdown-item tree-toggle" href="javascript:void(0);" data-item="hide">收起所有</a>
+                </div>
             </div>
             <div class="d-inline-block">
                 <div class="btn-group btn-group-toggle" data-toggle="buttons">

+ 8 - 4
config/config.default.js

@@ -1,6 +1,8 @@
 'use strict';
 
 const path = require('path');
+const fs = require('fs');
+
 module.exports = appInfo => {
     const config = {};
 
@@ -8,13 +10,13 @@ module.exports = appInfo => {
     config.mysql = {
         client: {
             // host
-            host: '127.0.0.1',
+            host: 'rm-wz9ae9t6qopwrday6.mysql.rds.aliyuncs.com',
             // 端口号
             port: '3306',
             // 用户名
             user: 'zh_calc',
             // 密码
-            password: 'zh@)!(3850calc',
+            password: 'Zh@)!(3850Calc',
             // 数据库名
             database: 'calculation',
         },
@@ -101,7 +103,7 @@ module.exports = appInfo => {
         app: true,
     };
 
-    config.filePath = '/etc/calc/files/';
+    config.filePath = '/etc/calc/files';
 
     // 上传设置
     config.multipart = {
@@ -118,7 +120,9 @@ module.exports = appInfo => {
     // 是否压缩替换前端js
     config.min = true;
 
-    config.version = '1.0.1';
+    const file = appInfo.baseDir + '/config/version';
+
+    config.version = fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : '1.0.4';
 
     // 压缩设置
     config.gzip = {

+ 1 - 0
config/web.js

@@ -298,6 +298,7 @@ const JsFiles = {
                     "/public/js/sub_menu.js",
                     "/public/js/div_resizer.js",
                     "/public/js/spreadjs_rela/spreadjs_zh.js",
+                    "/public/js/shares/sjs_setting.js",
                     "/public/js/zh_calc.js",
                     "/public/js/path_tree.js",
                     "/public/js/shares/bills_pos_convert.js",

+ 1 - 0
package.json

@@ -62,6 +62,7 @@
     "dev": "egg-bin dev --port 7002",
     "dev-local": "set EGG_SERVER_ENV=local&&egg-bin dev --port 7002",
     "dev-remoteqa": "set EGG_SERVER_ENV=remoteqa&&egg-bin dev --port 7002",
+    "dev-localpro": "set EGG_SERVER_ENV=localpro&&egg-bin dev --port 7002",
     "dev-temp": "set EGG_SERVER_ENV=temp&&egg-bin dev --port 7002",
     "dev-qa": "set EGG_SERVER_ENV=qa&&egg-bin dev --port 7002",
     "dev-test": "set EGG_SERVER_ENV=test&&egg-bin dev --port 7002",