Procházet zdrojové kódy

台账分解、台账修订,记住位置

MaiXinRong před 5 roky
rodič
revize
dbb70c755b
4 změnil soubory, kde provedl 287 přidání a 248 odebrání
  1. 104 123
      app/public/js/ledger.js
  2. 107 125
      app/public/js/revise.js
  3. 73 0
      app/public/js/std_lib.js
  4. 3 0
      config/web.js

+ 104 - 123
app/public/js/ledger.js

@@ -1479,6 +1479,108 @@ $(document).ready(function() {
             }
         }
     });
+    const stdLibCellDoubleClick = function (e, info) {
+        const stdSheet = info.sheet;
+        const mainSheet = ledgerSpread.getActiveSheet();
+        if (!stdSheet.zh_setting || !stdSheet.zh_tree || !mainSheet.zh_tree) { return; }
+
+        const stdTree = stdSheet.zh_tree;
+        const stdNode = stdTree.nodes[info.row];
+
+        const mainTree = mainSheet.zh_tree;
+        const sel = mainSheet.getSelections()[0];
+        const mainNode = mainTree.nodes[sel.row];
+        if (!stdNode) { return; }
+        if (info.sheet.zh_setting.stdType === 'gcl') {
+            if (mainNode.code && mainNode.code !== '' && !mainTree.isLeafXmj(mainNode)) {
+                toastr.warning('非最底层项目下,不应添加清单');
+                return;
+            }
+        }
+
+        postData(window.location.pathname + '/update', {
+            postType: 'add-std',
+            postData: {
+                id: ledgerTree.getNodeKey(mainNode),
+                tender_id: mainNode.tender_id,
+                stdType: info.sheet.zh_setting.stdType,
+                stdLibId: stdNode.list_id,
+                stdNode: stdTree.getNodeKey(stdNode)
+            }
+        }, function (result) {
+            const refreshNode = mainTree.loadPostData(result);
+            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);
+            } 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);
+                }
+            }
+            treeOperationObj.refreshOperationValid(mainSheet);
+            ledgerSpread.focus();
+            posOperationObj.loadCurPosData();
+        });
+    };
+    const stdXmjSetting = {
+        selector: '#std-xmj',
+        stdType: 'xmj',
+        treeSetting: {
+            id: 'chapter_id',
+            pid: 'pid',
+            order: 'order',
+            level: 'level',
+            rootId: -1,
+            keys: ['id', 'list_id', 'chapter_id'],
+        },
+        spreadSetting: {
+            cols: [
+                {title: '项目节编号', field: 'code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
+                {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
+                {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
+            ],
+            treeCol: 0,
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [32],
+            defaultRowHeight: 21,
+            headerFont: '12px 微软雅黑',
+            font: '12px 微软雅黑',
+            headColWidth: [0],
+        },
+        cellDoubleClick: stdLibCellDoubleClick,
+        page: 'ledger',
+    };
+    const stdGclSetting = {
+        selector: '#std-gcl',
+        stdType: 'gcl',
+        treeSetting: {
+            id: 'bill_id',
+            pid: 'pid',
+            order: 'order',
+            level: 'level',
+            rootId: -1,
+            keys: ['id', 'list_id', 'bill_id']
+        },
+        spreadSetting: {
+            cols: [
+                {title: '清单编号', field: 'b_code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
+                {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
+                {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
+            ],
+            treeCol: 0,
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [32],
+            defaultRowHeight: 21,
+            headerFont: '12px 微软雅黑',
+            font: '12px 微软雅黑',
+            headColWidth: [0],
+        },
+        cellDoubleClick: stdLibCellDoubleClick,
+        page: 'ledger',
+    };
     // 展开收起标准清单
     $('a', '#side-menu').bind('click', function (e) {
         e.preventDefault();
@@ -1516,55 +1618,13 @@ $(document).ready(function() {
             showSideTools(tab.hasClass('active'));
             if (tab.attr('content') === '#std-xmj') {
                 if (!stdXmj) {
-                    stdXmj = new stdLib('#std-xmj', 'xmj', {
-                        id: 'chapter_id',
-                        pid: 'pid',
-                        order: 'order',
-                        level: 'level',
-                        rootId: -1,
-                        keys: ['id', 'list_id', 'chapter_id'],
-                    }, {
-                        cols: [
-                            {title: '项目节编号', field: 'code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
-                            {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
-                            {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
-                        ],
-                        treeCol: 0,
-                        emptyRows: 0,
-                        headRows: 1,
-                        headRowHeight: [32],
-                        defaultRowHeight: 21,
-                        headerFont: '12px 微软雅黑',
-                        font: '12px 微软雅黑',
-                        headColWidth: [0],
-                    });
+                    stdXmj = new stdLib(stdXmjSetting);
                     stdXmj.loadLib($('select', '#std-xmj').val());
                 }
                 stdXmj.spread.refresh();
             } else if (tab.attr('content') === '#std-gcl') {
                 if (!stdGcl) {
-                    stdGcl = new stdLib('#std-gcl', 'gcl', {
-                        id: 'bill_id',
-                        pid: 'pid',
-                        order: 'order',
-                        level: 'level',
-                        rootId: -1,
-                        keys: ['id', 'list_id', 'bill_id']
-                    }, {
-                        cols: [
-                            {title: '清单编号', field: 'b_code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
-                            {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
-                            {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
-                        ],
-                        treeCol: 0,
-                        emptyRows: 0,
-                        headRows: 1,
-                        headRowHeight: [32],
-                        defaultRowHeight: 21,
-                        headerFont: '12px 微软雅黑',
-                        font: '12px 微软雅黑',
-                        headColWidth: [0],
-                    });
+                    stdGcl = new stdLib(stdGclSetting);
                     stdGcl.loadLib($('select', '#std-gcl').val());
                 }
                 stdGcl.spread.refresh();
@@ -1628,85 +1688,6 @@ $(document).ready(function() {
             posSpread.refresh();
         }
     });
-
-    class stdLib {
-        constructor(selector, stdType, treeSetting, spreadSetting) {
-            const self = this;
-            this.obj = $(selector + '-spread')[0];
-            this.stdType = stdType;
-            this.treeSetting = treeSetting;
-            treeSetting.preUrl = this.url;
-            this.spreadSetting = spreadSetting;
-            this.spread = SpreadJsObj.createNewSpread(this.obj);
-            SpreadJsObj.initSheet(this.spread.getActiveSheet(), this.spreadSetting);
-            SpreadJsObj.forbiddenSpreadContextMenu(selector, this.spread);
-            this.spread.getActiveSheet().bind(GC.Spread.Sheets.Events.CellDoubleClick, function (e, info) {
-                const stdSheet = info.sheet;
-                const mainSheet = ledgerSpread.getActiveSheet();
-                if (!stdSheet.zh_setting || !stdSheet.zh_tree || !mainSheet.zh_tree) { return; }
-
-                const stdTree = stdSheet.zh_tree;
-                const stdNode = stdTree.nodes[info.row];
-
-                const mainTree = mainSheet.zh_tree;
-                const sel = mainSheet.getSelections()[0];
-                const mainNode = mainTree.nodes[sel.row];
-                if (!stdNode) { return; }
-                if (stdType === 'gcl') {
-                    if (mainNode.code && mainNode.code !== '' && !mainTree.isLeafXmj(mainNode)) {
-                        toastr.warning('非最底层项目下,不应添加清单');
-                        return;
-                    }
-                }
-
-                postData(window.location.pathname + '/update', {
-                    postType: 'add-std',
-                    postData: {
-                        id: ledgerTree.getNodeKey(mainNode),
-                        tender_id: mainNode.tender_id,
-                        stdType: stdType,
-                        stdLibId: stdNode.list_id,
-                        stdNode: stdTree.getNodeKey(stdNode)
-                    }
-                }, function (result) {
-                    const refreshNode = mainTree.loadPostData(result);
-                    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);
-                    } 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);
-                        }
-                    }
-                    treeOperationObj.refreshOperationValid(mainSheet);
-                    ledgerSpread.focus();
-                    posOperationObj.loadCurPosData();
-                });
-            });
-            this.pathTree = createNewPathTree('base', this.treeSetting);
-            this.cacheLib = [];
-            $('select', selector).change(function () {
-                self.loadLib(parseInt(this.value));
-            });
-        }
-        loadLib (listId) {
-            const cacheData = this.cacheLib.find(function (lib) {
-                return lib.id === listId;
-            });
-            if (cacheData) {
-                this.pathTree.loadDatas(cacheData.data);
-                SpreadJsObj.loadSheetData(this.spread.getActiveSheet(), 'tree', this.pathTree);
-            } else {
-                const self = this;
-                postData('/std-lib/get-data', {stdType: this.stdType, list_id: listId}, function (data) {
-                    self.cacheLib.push({id: listId, data: data});
-                    self.pathTree.loadDatas(data);
-                    SpreadJsObj.loadSheetData(self.spread.getActiveSheet(), 'tree', self.pathTree);
-                });
-            }
-        }
-    }
     class DealBills {
         constructor (selector, spreadSetting) {
             const self = this;

+ 107 - 125
app/public/js/revise.js

@@ -1087,87 +1087,6 @@ $(document).ready(() => {
         }
     });
 
-    class stdLib {
-        constructor(selector, stdType, treeSetting, spreadSetting) {
-            const self = this;
-            this.obj = $(selector + '-spread')[0];
-            this.stdType = stdType;
-            this.treeSetting = treeSetting;
-            treeSetting.preUrl = this.url;
-            this.spreadSetting = spreadSetting;
-            this.spread = SpreadJsObj.createNewSpread(this.obj);
-            SpreadJsObj.initSheet(this.spread.getActiveSheet(), this.spreadSetting);
-            if (!readOnly) {
-                this.spread.getActiveSheet().bind(GC.Spread.Sheets.Events.CellDoubleClick, function (e, info) {
-                    const stdSheet = info.sheet;
-                    const mainSheet = billsSheet;
-                    if (!stdSheet.zh_setting || !stdSheet.zh_tree || !mainSheet.zh_tree) { return; }
-
-                    const stdTree = stdSheet.zh_tree;
-                    const stdNode = stdTree.nodes[info.row];
-                    const mainTree = mainSheet.zh_tree;
-                    const sel = mainSheet.getSelections()[0];
-                    const mainNode = mainTree.nodes[sel.row];
-                    if (!stdNode) return;
-
-                    if (stdType === 'gcl') {
-                        if (mainNode.code && mainNode.code !== '' && !mainTree.isLeafXmj(mainNode)) {
-                            toastr.warning('非最底层项目下,不应添加节点');
-                            return;
-                        }
-                    }
-
-                    postData(window.location.pathname + '/update', {
-                        postType: 'add-std',
-                        postData: {
-                            id: mainTree.getNodeKey(mainNode),
-                            tender_id: mainNode.tender_id,
-                            stdType: stdType,
-                            stdLibId: stdNode.list_id,
-                            stdNode: stdTree.getNodeKey(stdNode)
-                        }
-                    }, function (result) {
-                        const refreshNode = mainTree.loadPostData(result);
-                        billsTreeSpreadObj.refreshTree(mainSheet, refreshNode);
-                        if (sel) {
-                            if (refreshNode.create && refreshNode.create.length > 0) {
-                                mainSheet.setSelection(refreshNode.create[refreshNode.create.length - 1].index, sel.col, sel.rowCount, sel.colCount);
-                            } 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);
-                                }
-                            }
-                        }
-                        billsTreeSpreadObj.refreshOperationValid(mainSheet);
-                        billsSpread.focus();
-                        posSpreadObj.loadCurPosData();
-                    });
-                });
-            }
-            this.pathTree = createNewPathTree('base', this.treeSetting);
-            this.cacheLib = [];
-            $('select', selector).change(function () {
-                self.loadLib(parseInt(this.value));
-            });
-        }
-        loadLib (listId) {
-            const cacheData = this.cacheLib.find(function (lib) {
-                return lib.id === listId;
-            });
-            if (cacheData) {
-                this.pathTree.loadDatas(cacheData.data);
-                SpreadJsObj.loadSheetData(this.spread.getActiveSheet(), 'tree', this.pathTree);
-            } else {
-                const self = this;
-                postData('/std-lib/get-data', {stdType: this.stdType, list_id: listId}, function (data) {
-                    self.cacheLib.push({id: listId, data: data});
-                    self.pathTree.loadDatas(data);
-                    SpreadJsObj.loadSheetData(self.spread.getActiveSheet(), 'tree', self.pathTree);
-                });
-            }
-        }
-    }
     class DealBills {
         constructor (selector, spreadSetting) {
             const self = this;
@@ -1504,6 +1423,111 @@ $(document).ready(() => {
     if (posSpread) {
         posSpread.refresh();
     }
+
+    const stdLibCellDoubleClick = function (e, info) {
+        const stdSheet = info.sheet;
+        const mainSheet = billsSheet;
+        if (!stdSheet.zh_setting || !stdSheet.zh_tree || !mainSheet.zh_tree) { return; }
+
+        const stdTree = stdSheet.zh_tree;
+        const stdNode = stdTree.nodes[info.row];
+        const mainTree = mainSheet.zh_tree;
+        const sel = mainSheet.getSelections()[0];
+        const mainNode = mainTree.nodes[sel.row];
+        if (!stdNode) return;
+
+        if (info.sheet.zh_setting.stdType === 'gcl') {
+            if (mainNode.code && mainNode.code !== '' && !mainTree.isLeafXmj(mainNode)) {
+                toastr.warning('非最底层项目下,不应添加节点');
+                return;
+            }
+        }
+
+        postData(window.location.pathname + '/update', {
+            postType: 'add-std',
+            postData: {
+                id: mainTree.getNodeKey(mainNode),
+                tender_id: mainNode.tender_id,
+                stdType: info.sheet.zh_setting.stdType,
+                stdLibId: stdNode.list_id,
+                stdNode: stdTree.getNodeKey(stdNode)
+            }
+        }, function (result) {
+            const refreshNode = mainTree.loadPostData(result);
+            billsTreeSpreadObj.refreshTree(mainSheet, refreshNode);
+            if (sel) {
+                if (refreshNode.create && refreshNode.create.length > 0) {
+                    mainSheet.setSelection(refreshNode.create[refreshNode.create.length - 1].index, sel.col, sel.rowCount, sel.colCount);
+                } 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);
+                    }
+                }
+            }
+            billsTreeSpreadObj.refreshOperationValid(mainSheet);
+            billsSpread.focus();
+            posSpreadObj.loadCurPosData();
+        });
+    };
+    const stdXmjSetting = {
+        selector: '#std-xmj',
+        stdType: 'xmj',
+        treeSetting: {
+            id: 'chapter_id',
+            pid: 'pid',
+            order: 'order',
+            level: 'level',
+            rootId: -1,
+            keys: ['id', 'list_id', 'chapter_id'],
+        },
+        spreadSetting: {
+            cols: [
+                {title: '项目节编号', field: 'code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
+                {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
+                {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
+            ],
+            treeCol: 0,
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [32],
+            defaultRowHeight: 21,
+            headerFont: '12px 微软雅黑',
+            font: '12px 微软雅黑',
+            headColWidth: [0],
+        },
+        cellDoubleClick: stdLibCellDoubleClick,
+        page: 'revise',
+    };
+    const stdGclSetting = {
+        selector: '#std-gcl',
+        stdType: 'gcl',
+        treeSetting: {
+            id: 'bill_id',
+            pid: 'pid',
+            order: 'order',
+            level: 'level',
+            rootId: -1,
+            keys: ['id', 'list_id', 'bill_id']
+        },
+        spreadSetting: {
+            cols: [
+                {title: '清单编号', field: 'b_code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
+                {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
+                {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
+            ],
+            treeCol: 0,
+            emptyRows: 0,
+            headRows: 1,
+            headRowHeight: [32],
+            defaultRowHeight: 21,
+            headerFont: '12px 微软雅黑',
+            font: '12px 微软雅黑',
+            headColWidth: [0],
+        },
+        cellDoubleClick: stdLibCellDoubleClick,
+        page: 'revise',
+    };
     // 展开收起标准节点
     $('a', '#side-menu').bind('click', function (e) {
         e.preventDefault();
@@ -1518,55 +1542,13 @@ $(document).ready(() => {
             showSideTools(tab.hasClass('active'));
             if (tab.attr('content') === '#std-xmj') {
                 if (!stdXmj) {
-                    stdXmj = new stdLib('#std-xmj', 'xmj', {
-                        id: 'chapter_id',
-                        pid: 'pid',
-                        order: 'order',
-                        level: 'level',
-                        rootId: -1,
-                        keys: ['id', 'list_id', 'chapter_id'],
-                    }, {
-                        cols: [
-                            {title: '项目节编号', field: 'code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
-                            {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
-                            {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
-                        ],
-                        treeCol: 0,
-                        emptyRows: 0,
-                        headRows: 1,
-                        headRowHeight: [32],
-                        defaultRowHeight: 21,
-                        headerFont: '12px 微软雅黑',
-                        font: '12px 微软雅黑',
-                        headColWidth: [0],
-                    });
+                    stdXmj = new stdLib(stdXmjSetting);
                     stdXmj.loadLib($('select', '#std-xmj').val());
                 }
                 stdXmj.spread.refresh();
             } else if (tab.attr('content') === '#std-gcl') {
                 if (!stdGcl) {
-                    stdGcl = new stdLib('#std-gcl', 'gcl', {
-                        id: 'bill_id',
-                        pid: 'pid',
-                        order: 'order',
-                        level: 'level',
-                        rootId: -1,
-                        keys: ['id', 'list_id', 'bill_id']
-                    }, {
-                        cols: [
-                            {title: '清单编号', field: 'b_code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
-                            {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
-                            {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true}
-                        ],
-                        treeCol: 0,
-                        emptyRows: 0,
-                        headRows: 1,
-                        headRowHeight: [32],
-                        defaultRowHeight: 21,
-                        headerFont: '12px 微软雅黑',
-                        font: '12px 微软雅黑',
-                        headColWidth: [0],
-                    });
+                    stdGcl = new stdLib(stdGclSetting);
                     stdGcl.loadLib($('select', '#std-gcl').val());
                 }
                 stdGcl.spread.refresh();

+ 73 - 0
app/public/js/std_lib.js

@@ -0,0 +1,73 @@
+'use strict';
+
+/**
+ *
+ *
+ * @author Mai
+ * @date
+ * @version
+ */
+
+// setting = {
+//     selector,
+//     stdType,
+//     treeSetting,
+//     spreadSetting,
+//     cellDoubleClick,
+//     page,
+// };
+
+class stdLib {
+    constructor(setting) {
+        const self = this;
+        this.setting = setting;
+        this.obj = $(setting.selector + '-spread')[0];
+        this.stdType = setting.stdType;
+        this.treeSetting = setting.treeSetting;
+        this.spreadSetting = setting.spreadSetting;
+        this.spreadSetting.stdType = setting.stdType;
+        this.spread = SpreadJsObj.createNewSpread(this.obj);
+        SpreadJsObj.initSheet(this.spread.getActiveSheet(), this.spreadSetting);
+        SpreadJsObj.forbiddenSpreadContextMenu(setting.selector, this.spread);
+        this.spread.getActiveSheet().bind(spreadNS.Events.CellDoubleClick, setting.cellDoubleClick);
+        this.spread.getActiveSheet().bind(spreadNS.Events.SelectionChanged, function (e, info) {
+            if (!info.oldSelections[0] || info.newSelections[0].row !== info.oldSelections[0].row) {
+                SpreadJsObj.saveTopAndSelect(info.sheet, self.cacheKey);
+            }
+        });
+        this.spread.getActiveSheet().bind(spreadNS.Events.TopRowChanged, function (e, info) {
+            SpreadJsObj.saveTopAndSelect(info.sheet, self.cacheKey);
+        });
+        this.pathTree = createNewPathTree('base', this.treeSetting);
+        this.cacheLib = [];
+        $('select', setting.selector).change(function () {
+            self.loadLib(parseInt(this.value), true);
+        });
+    }
+    loadLib (listId, reload = false) {
+        this.cacheKey = this.setting.page + '-' + this.setting.stdType + '-' + listId;
+        const self = this;
+        const locateMemory = function () {
+            if (!reload) {
+                SpreadJsObj.loadTopAndSelect(self.spread.getActiveSheet(), self.cacheKey);
+            } else {
+                removeLocalCache(self.cacheKey);
+            }
+        };
+        const cacheData = this.cacheLib.find(function (lib) {
+            return lib.id === listId;
+        });
+        if (cacheData) {
+            this.pathTree.loadDatas(cacheData.data);
+            SpreadJsObj.loadSheetData(this.spread.getActiveSheet(), 'tree', this.pathTree);
+            locateMemory();
+        } else {
+            postData('/std-lib/get-data', {stdType: this.stdType, list_id: listId}, function (data) {
+                self.cacheLib.push({id: listId, data: data});
+                self.pathTree.loadDatas(data);
+                SpreadJsObj.loadSheetData(self.spread.getActiveSheet(), 'tree', self.pathTree);
+                locateMemory();
+            });
+        }
+    }
+}

+ 3 - 0
config/web.js

@@ -134,6 +134,7 @@ const JsFiles = {
                     "/public/js/zh_calc.js",
                     "/public/js/path_tree.js",
                     "/public/js/ledger_tree_col.js",
+                    "/public/js/std_lib.js",
                     "/public/js/ledger.js",
                 ],
                 mergeFile: 'explode',
@@ -182,6 +183,7 @@ const JsFiles = {
                     "/public/js/ledger_search.js",
                     "/public/js/zh_calc.js",
                     "/public/js/path_tree.js",
+                    "/public/js/std_lib.js",
                     "/public/js/revise.js",
                 ],
                 mergeFile: 'revise',
@@ -201,6 +203,7 @@ const JsFiles = {
                     "/public/js/ledger_search.js",
                     "/public/js/zh_calc.js",
                     "/public/js/path_tree.js",
+                    "/public/js/std_lib.js",
                     "/public/js/revise.js",
                 ],
                 mergeFile: 'revise',