Prechádzať zdrojové kódy

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

MaiXinRong 5 rokov pred
rodič
commit
c60ef07c58

+ 1 - 3
app/controller/change_controller.js

@@ -130,7 +130,6 @@ module.exports = app => {
                 codeRule,
                 dealCode: ctx.tender.info.deal_info.dealCode,
                 auditConst: audit.flow,
-                ledgerConsts: audit.ledger.status,
                 changeConst,
                 ruleType: codeRuleConst.ruleType.change,
                 ruleConst: codeRuleConst.measure,
@@ -271,10 +270,8 @@ module.exports = app => {
 
                 // 根据auditStatus获取审批人列表
                 const auditList = await ctx.service.changeAudit.getListByStatus(change, auditStatus);
-
                 // 获取已选清单
                 let changeList = await ctx.service.changeAuditList.getAllDataByCondition({ where: { cid: ctx.params.cid } });
-
                 const renderData = {
                     uid: ctx.session.sessionUser.accountId,
                     tender,
@@ -282,6 +279,7 @@ module.exports = app => {
                     changeConst,
                     auditStatus,
                     auditConst: audit.flow,
+                    ledgerConsts: audit.ledger.status,
                     attList,
                     whiteList,
                     auditList,

+ 1 - 1
app/controller/report_controller.js

@@ -133,7 +133,7 @@ module.exports = app => {
                 for (const prjAcc of prjAccList) {
                     prjAcc.account_group = accountGroup[prjAcc.account_group];
                 }
-                let rpt_tpl_items = '{ customize: { "isDftAll": true }, common: [] }';
+                let rpt_tpl_items = '{ customize: [], common: [] }';
                 if (custTreeNodes.length > 0) {
                     rpt_tpl_items = custTreeNodes[0].rpt_tpl_items;
                 }

+ 14 - 8
app/public/js/change.js

@@ -184,10 +184,7 @@ $(document).ready(() => {
     $('.ml-auto').on('click', 'a', function () {
         const content = $(this).attr('href');
         if (content === '#add-bj') {
-            if (parseInt(ledger_status) === ledgerConsts.uncheck) {
-                $('#warning-ledger').modal('show');
-            } else {
-                $('#add-bj-modal').modal('show')
+            $('#add-bj-modal').modal('show')
                 getNewCode();
                 if ($('#changeList').children.length === 0) {
                     $('#addCancel').hide();
@@ -195,7 +192,18 @@ $(document).ready(() => {
                     $('#addCancel').show();
                 }
                 $('#bj-code').removeClass('is-invalid');
-            }
+            // if (parseInt(ledger_status) === ledgerConsts.uncheck) {
+            //     $('#warning-ledger').modal('show');
+            // } else {
+            //     $('#add-bj-modal').modal('show')
+            //     getNewCode();
+            //     if ($('#changeList').children.length === 0) {
+            //         $('#addCancel').hide();
+            //     } else {
+            //         $('#addCancel').show();
+            //     }
+            //     $('#bj-code').removeClass('is-invalid');
+            // }
         }
     })
     // 新增变更令 modal显示
@@ -213,9 +221,7 @@ $(document).ready(() => {
     //     }
     //     $('#bj-code').removeClass('is-invalid');
     // });
-    $('#led-warning').click(function () {
-        $('#warning-ledger').modal('hide');
-    })
+
     // 获取最新可用变更令号
     $('#autoCode').click(getNewCode);
     // 新增变更令 确认

+ 0 - 1
app/public/js/change_approval.js

@@ -149,7 +149,6 @@ const postDataWithAsync = function (url, data, successCallback, errorCallBack, s
 };
 
 function auditCheck(i) {
-    console.log('111111111')
     const inlineRadio1 = $('#change-back:checked').val()
     const inlineRadio2 = $('#chagne-backnew:checked').val()
     const opinion = $('textarea[name="sdesc"]').eq(i).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');

+ 3 - 0
app/public/js/stage.js

@@ -3068,6 +3068,9 @@ $(document).ready(() => {
                 // 审核被退回,原报上传的附件可以删除
                 if (stage.status === auditConst.status.checkNo && parseInt(cur_uid) !== stage.user_id) showDel = false;
 
+                // 审核中,原报上传的图片不能删除
+                if (stage.status === auditConst.status.checking && stage.user_id === parseInt(cur_uid)) showDel = false;
+
                 // 台账未上报、当前用户为原报, 可以删除附件
                 if (stage.status === auditConst.status.uncheck && stage.user_id !== parseInt(cur_uid)) showDel = false;
 

+ 22 - 1
app/view/change/bills_modal.ejs

@@ -207,4 +207,25 @@
             </div>
         </div>
     </div>
-</div>
+</div>
+
+<div class="modal fade" id="warning-ledger" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">警告</h5>
+            </div>
+            <div class="modal-body">
+                <h5>请先上报审批台账,再上报审批变更令。</h5>
+            </div>
+            <div class="modal-footer">
+                <button id="led-warning" class="btn btn-danger btn-sm">确定</button>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    $('#led-warning').click(function () {
+        $('#warning-ledger').modal('hide');
+    });
+</script>

+ 21 - 1
app/view/change/file_modal.ejs

@@ -43,4 +43,24 @@
             </div>
         </div>
     </div>
-</div>
+</div>
+<div class="modal fade" id="warning-ledger" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">警告</h5>
+            </div>
+            <div class="modal-body">
+                <h5>请先上报审批台账,再上报审批变更令。</h5>
+            </div>
+            <div class="modal-footer">
+                <button id="led-warning" class="btn btn-danger btn-sm">确定</button>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    $('#led-warning').click(function () {
+        $('#warning-ledger').modal('hide');
+    });
+</script>

+ 0 - 3
app/view/change/index.ejs

@@ -80,9 +80,6 @@
         </div>
     </div>
 </div>
-<script>
-    const tendetStatus = '<%- tender %>'
-</script>
 <script src="/public/js/sub_menu.js"></script>
 <script>
     $.subMenu({

+ 9 - 0
app/view/change/info.ejs

@@ -736,7 +736,16 @@
     const totalPriceUnit = '<%- tpUnit %>';
     const unitPriceUnit = '<%- upUnit %>';
     const accountId = '<%- uid %>';
+    const ledgeStatus = '<%- tender.ledger_status %>';
+    const ledgerConsts = JSON.parse('<%- JSON.stringify(ledgerConsts) %>');
     autoFlashHeight();
+    $('a[href="#sub-ap"').click(function() {
+        if (parseInt(ledgeStatus) === ledgerConsts.uncheck) {
+            $('#warning-ledger').modal('show');
+            return false
+        }
+    });
+
 </script>
 <script src="/public/js/datatable/jquery.dataTables.min.js"></script>
 <script src="/public/js/datatable/dataTables.bootstrap4.min.js"></script>

+ 30 - 0
app/view/change/info_modal.ejs

@@ -789,3 +789,33 @@
     </div>
 </div>
 <% } %>
+
+<div class="modal fade" id="warning-ledger" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">警告</h5>
+            </div>
+            <div class="modal-body">
+                <h5>请先上报审批台账,再上报审批变更令。</h5>
+            </div>
+            <div class="modal-footer">
+                <button id="led-warning" class="btn btn-danger btn-sm">确定</button>
+            </div>
+        </div>
+    </div>
+</div>
+
+<script>
+    $('.modal').on('shown.bs.modal', function () {
+        const height = $(this)[0].scrollHeight
+        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]')
+        // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
+        if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
+            scrollBox.scrollTop(height);
+        }
+    });
+    $('#led-warning').click(function () {
+        $('#warning-ledger').modal('hide');
+    });
+</script>

+ 0 - 18
app/view/change/modal.ejs

@@ -18,22 +18,6 @@
     </div>
 </div>
 
-<div class="modal fade" id="warning-ledger" data-backdrop="static">
-    <div class="modal-dialog" role="document">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h5 class="modal-title">警告</h5>
-            </div>
-            <div class="modal-body">
-                <h5>请先上报审批台账,再上报审批变更令。</h5>
-            </div>
-            <div class="modal-footer">
-                <button id="led-warning" class="btn btn-danger btn-sm">确定</button>
-            </div>
-        </div>
-    </div>
-</div>
-
 <% if (tender.user_id === uid) { %>
 <!--弹出添加变更令-->
 <div class="modal fade" id="add-bj-modal" data-backdrop="static">
@@ -150,8 +134,6 @@
     let codeRule = JSON.parse('<%- JSON.stringify(codeRule) %>');
     let connectorRule = '<%- tender.c_connector %>';
     let cRuleFirst = '<%- tender.c_rule_first %>';
-    const ledger_status = '<%- JSON.stringify(tender.ledger_status) %>';
-    const ledgerConsts = JSON.parse('<%- JSON.stringify(ledgerConsts) %>');
 </script>
 <script src="/public/js/moment/moment.min.js"></script>
 

+ 8 - 2
app/view/material/audit_modal.ejs

@@ -867,6 +867,12 @@
 <% } %>
 
 <script>
-    const au = JSON.parse('<%- JSON.stringify(ctx.material.auditHistory) %>');
-    console.log(au);
+    $('.modal').on('shown.bs.modal', function () {
+        const height = $(this)[0].scrollHeight
+        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]')
+        // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
+        if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
+            scrollBox.scrollTop(height);
+        }
+    });
 </script>

+ 9 - 5
app/view/report/index.ejs

@@ -21,8 +21,8 @@
                 <div class="d-inline-block">
                     <ul class="nav nav-pills m-0">
                         <li class="nav-item mr-1"><a href="#man-c" data-toggle="modal" data-target="#man-c" class=" btn btn-outline-primary btn-sm"><i class="fa fa-cog"></i> 通用报表</a></li>
+                        <li class="nav-item"><a href="#man-i" data-toggle="modal" data-target="#man-i" class=" btn btn-outline-primary btn-sm"><i class="fa fa-plus"></i> 定制报表</a></li>
                         <!--
-                        <li class="nav-item"><a href="#add-c" data-toggle="modal" data-target="#add-c" class=" btn btn-outline-primary btn-sm"><i class="fa fa-plus"></i> 定制报表</a></li>
                         -->
                     </ul>
                 </div>
@@ -264,6 +264,9 @@
 <script type="text/javascript">
     let TOP_TREE_NODES = <%- rpt_tpl_data %>;
     const CUST_TREE_NODES = <%- cust_tpl_data %>;
+    if (!(CUST_TREE_NODES.customize instanceof Array)) {
+        CUST_TREE_NODES.customize = [];
+    }
     const ORG_CUST_TREE_NODES = JSON.parse(JSON.stringify(CUST_TREE_NODES));
     let CUST_CFG = <%- cust_cfg %>;
     CUST_CFG = JSON.parse(CUST_CFG[0].cfg_content);
@@ -355,16 +358,16 @@
         return SCREEN_DPI;
     }
 
-    function filterUnchkTplTreeNode(topNode) {
+    function filterUnchkTplTreeNode(topNode, srcData) {
         for (let rIdx = topNode.items.length - 1; rIdx >= 0; rIdx--) {
-            if (CUST_TREE_NODES.common.indexOf(topNode.items[rIdx].name) < 0) {
+            if (srcData.indexOf(topNode.items[rIdx].name) < 0) {
                 //topNode.items.splice(rIdx, 1);
                 //支持第二层判断
                 //备注:如果选择了父项,那不用再去判断子项
                 if (topNode.items[rIdx].items && topNode.items[rIdx].items.length > 0) {
                     for (let rIdx2 = topNode.items[rIdx].items.length - 1; rIdx2 >= 0; rIdx2--) {
                         let tName = topNode.items[rIdx].name + FOLDER_SEPERATER + topNode.items[rIdx].items[rIdx2].name;
-                        if (CUST_TREE_NODES.common.indexOf(tName) < 0) {
+                        if (srcData.indexOf(tName) < 0) {
                             topNode.items[rIdx].items.splice(rIdx2, 1);
                         }
                     }
@@ -391,8 +394,9 @@
                 }
             }
             // 1.1 移除未被选择的模板
-            filterUnchkTplTreeNode(TOP_TREE_NODES[0]);
+            filterUnchkTplTreeNode(TOP_TREE_NODES[0], CUST_TREE_NODES.common);
             TOP_TREE_NODES.unshift(individualNode); //定制在前
+            filterUnchkTplTreeNode(TOP_TREE_NODES[0], CUST_TREE_NODES.customize);
             //2. 原始的模板树(恢复用)
             const individualNodeOrg = {id: 99999, name: '定制报表', pid: -1, rpt_type: 0, items: [], isParent: true};
             for (let tnIdx = ORG_TOP_TREE_NODES.length - 1; tnIdx >= 0; tnIdx--) {

+ 69 - 30
app/view/report/rpt_all_popup.ejs

@@ -360,7 +360,28 @@
                 </div>
             </div>
             <div class="modal-footer">
-                <button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="revertCustRptCfg();">关闭</button>
+                <button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="revertCommonCustRptCfg();">关闭</button>
+                <!--有结果出现添加-->
+                <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="updateCustRptCfg()">确认</button>
+            </div>
+        </div>
+    </div>
+</div>
+<!--管理定制报表-->
+<div class="modal fade" id="man-i" data-backdrop="static">
+    <div class="modal-dialog" role="document">
+        <div class="modal-content">
+            <div class="modal-header">
+                <h5 class="modal-title">管理定制报表</h5>
+            </div>
+            <div class="modal-body">
+                <div class="modal-height-500" style="overflow: auto;">
+                    <table class="table table-sm table-bordered" id="report_cust_group_individual">
+                    </table>
+                </div>
+            </div>
+            <div class="modal-footer">
+                <button type="button" class="btn btn-secondary" data-dismiss="modal" onclick="revertIndividualCustRptCfg();">关闭</button>
                 <!--有结果出现添加-->
                 <button type="button" class="btn btn-primary" data-dismiss="modal" onclick="updateCustRptCfg()">确认</button>
             </div>
@@ -371,7 +392,8 @@
 <script>
     zTreeOprObj.getCustomerCfg();
     zTreeOprObj.iniFontCfgDom(CUST_CFG);
-    buildCommonCustRpt();
+    buildCustRptCommon('report_cust_group_common', ORG_TOP_TREE_NODES[1], CUST_TREE_NODES.common, 'true');
+    buildCustRptCommon('report_cust_group_individual', ORG_TOP_TREE_NODES[0], CUST_TREE_NODES.customize, 'false');
 
     function searchAccount() {
         if (event.keyCode == 13) {
@@ -379,9 +401,8 @@
         }
     }
 
-    function buildCommonCustRpt() {
-        //CUST_TREE_NODES
-        let tbDom = $("#report_cust_group_common");
+    function buildCustRptCommon(tbDomId, topTreeNode, checkingArr, isCommonStr) {
+        let tbDom = $("#" + tbDomId);
         tbDom.empty();
         tbDom.append('<tr><th>类别</th><th>包含报表</th><th>显示</th></tr>');
         let _countAvailableTpls = function (tItem) {
@@ -397,7 +418,7 @@
             }
             return rst;
         };
-        let _pushRptLine = function (parentItem, rptItem, level, needChk) {
+        let _pushRptLine = function (parentItem, rptItem, level, needChk, parentNodeIdStr, thisItemSeq) {
             if (rptItem.nodeType === 1) {
                 let amt = _countAvailableTpls(rptItem);
                 let classStr = '';
@@ -406,30 +427,35 @@
                 }
                 if (needChk) {
                     let chkName = parentItem.name + FOLDER_SEPERATER + rptItem.name;
-                    let checkedStr = (CUST_TREE_NODES.common.indexOf(chkName) >= 0) ? ' checked' : '';
-                    tbDom.append('<tr><td class="' + classStr + '">' + rptItem.name + '</td><td>' + amt + '</td><td><input onchange="changeFolder(this, true)" hiddenval="' + chkName + '" type="checkbox"' + checkedStr + '></td></tr>');
+                    let checkedStr = (checkingArr.indexOf(chkName) >= 0) ? ' checked' : '';
+                    let sIdStr = parentNodeIdStr + '_sub_' + thisItemSeq;
+                    tbDom.append('<tr><td class="' + classStr + '">' + rptItem.name + '</td><td>' + amt + '</td><td><input id="' + sIdStr + '" onchange="changeFolder(this, ' + isCommonStr + ', "' + parentNodeIdStr + '")" hiddenval="' + chkName + '" type="checkbox"' + checkedStr + '></td></tr>');
                 } else {
                     tbDom.append('<tr><td class="' + classStr + '">' + rptItem.name + '</td><td>' + amt + '</td><td></td></tr>');
                 }
-                //tbDom.append('<tr><td class="' + classStr + '">' + rptItem.name + '</td><td>' + amt + '</td><td></td></tr>');
                 if (rptItem.items && rptItem.items.length > 0) {
                     for (const subItem of rptItem.items) {
-                        _pushRptLine(rptItem, subItem, level + 1, false);
+                        _pushRptLine(rptItem, subItem, level + 1, false, '');
                     }
                 }
             }
         }
         let TplAmts = [];
-        for (const topItem of ORG_TOP_TREE_NODES[1].items) {
+        let parentIdx = 0;
+        let subCnt = topTreeNode.items.length;
+        for (const topItem of topTreeNode.items) {
             TplAmts.push(_countAvailableTpls(topItem));
-            let checkedStr = (CUST_TREE_NODES.common.indexOf(topItem.name) >= 0) ? ' checked' : '';
-            //let checkedStr = (CUST_TREE_NODES.length > 0) ? ' checked' : '';
-            tbDom.append('<tr><td>' + topItem.name + '</td><td>' + TplAmts[TplAmts.length - 1] + '</td><td><input onchange="changeFolder(this, true)" hiddenval="' + topItem.name + '" type="checkbox"' + checkedStr + '></td></tr>');
+            let checkedStr = (checkingArr.indexOf(topItem.name) >= 0) ? ' checked' : '';
+            let pIdStr = tbDomId + '_' + parentIdx + '_' + subCnt;
+            tbDom.append('<tr><td>' + topItem.name + '</td><td>' + TplAmts[TplAmts.length - 1] + '</td><td><input id="' + pIdStr + '" onchange="changeFolder(this, ' + isCommonStr + ', null)" hiddenval="' + topItem.name + '" type="checkbox"' + checkedStr + '></td></tr>');
             if (topItem.items && topItem.items.length > 0) {
+                let subSeq = 0;
                 for (const subItem of topItem.items) {
-                    _pushRptLine(topItem, subItem, 1, true);
+                    _pushRptLine(topItem, subItem, 1, true, pIdStr, subSeq);
                 }
+                subSeq++;
             }
+            parentIdx++;
         }
     }
 
@@ -441,10 +467,12 @@
                 try {
                     // console.log(result);
                     ORG_CUST_TREE_NODES.common = JSON.parse(JSON.stringify(CUST_TREE_NODES.common));
+                    ORG_CUST_TREE_NODES.customize = JSON.parse(JSON.stringify(CUST_TREE_NODES.customize));
                     //刷新报表模板树
                     TOP_TREE_NODES = JSON.parse(JSON.stringify(ORG_TOP_TREE_NODES));
                     // 移除未被选择的模板
-                    filterUnchkTplTreeNode(TOP_TREE_NODES[1]);
+                    filterUnchkTplTreeNode(TOP_TREE_NODES[0], CUST_TREE_NODES.customize);
+                    filterUnchkTplTreeNode(TOP_TREE_NODES[1], CUST_TREE_NODES.common);
                     zTreeOprObj.getReportTemplateTree();
                 } catch(err) {
                 }
@@ -456,28 +484,39 @@
         );
     }
 
-    function revertCustRptCfg(){
+    function revertCommonCustRptCfg(){
         CUST_TREE_NODES.common = JSON.parse(JSON.stringify(ORG_CUST_TREE_NODES.common));
-        buildCommonCustRpt();
+        buildCustRptCommon('report_cust_group_common', ORG_TOP_TREE_NODES[1], CUST_TREE_NODES.common, 'true');
+    }
+
+    function revertIndividualCustRptCfg(){
+        CUST_TREE_NODES.customize = JSON.parse(JSON.stringify(ORG_CUST_TREE_NODES.customize));
+        buildCustRptCommon('report_cust_group_individual', ORG_TOP_TREE_NODES[0], CUST_TREE_NODES.customize, 'false');
     }
 
-    function changeFolder(dom, isCommon) {
-        let idx = CUST_TREE_NODES.common.indexOf(dom.attributes['hiddenval'].value);
+    function changeFolder(dom, isCommon, parentIdStr) {
+        let prop = null;
+        if (isCommon) {
+            prop = CUST_TREE_NODES.common;
+        } else {
+            prop = CUST_TREE_NODES.customize;
+        }
+        let idx = prop.indexOf(dom.attributes['hiddenval'].value);
         if (dom.checked) {
-            if (isCommon) {
-                if (idx < 0) {
-                    CUST_TREE_NODES.common.push(dom.attributes['hiddenval'].value);
+            if (idx < 0) {
+                prop.push(dom.attributes['hiddenval'].value);
+                if (parentIdStr === null) {
+                    //这是父节点,需要把所有子节点都勾上
+                    //后期补上
                 }
-            } else {
-                //保留定制报表分支
             }
         } else {
-            if (isCommon) {
-                if (idx >= 0) {
-                    CUST_TREE_NODES.common.splice(idx, 1);
+            if (idx >= 0) {
+                prop.splice(idx, 1);
+                if (parentIdStr === null) {
+                    //这是父节点,需要把所有子节点都uncheck
+                    //后期补上
                 }
-            } else {
-                //保留定制报表分支
             }
         }
     }

+ 12 - 4
app/view/stage/audit_modal.ejs

@@ -104,7 +104,7 @@
                                     </ul>
                                 </div>
                             </div>
-                            <div class="col-8 modal-height-500" style="overflow: auto">
+                            <div class="col-8 modal-height-500" style="overflow: auto" >
                                 <% for (const ah of ctx.stage.auditHistory) { %>
                                     <div class="card mt-3">
                                         <ul class="list-group list-group-flush">
@@ -413,7 +413,7 @@
         </div>
     <% } else { %>
         <!--审批流程/结果-->
-        <div class="modal fade" id="sp-list" data-backdrop="static">
+        <div class="modal fade" id="sp-list" data-backdrop="static" >
             <div class="modal-dialog modal-lg" role="document">
                 <div class="modal-content">
                     <div class="modal-header">
@@ -439,7 +439,7 @@
                                     </ul>
                                 </div>
                             </div>
-                            <div class="col-8 modal-height-500" style="overflow: auto">
+                            <div class="col-8 modal-height-500" style="overflow: auto" >
                                 <% for (const ah of ctx.stage.auditHistory) { %>
                                     <div class="card mt-3">
                                         <ul class="list-group list-group-flush">
@@ -593,7 +593,7 @@
                                 </ul>
                             </div>
                         </div>
-                        <div class="col-8 modal-height-500" style="overflow: auto">
+                        <div class="col-8 modal-height-500" style="overflow: auto" id="scroll-box">
                             <% for (const ah of ctx.stage.auditHistory) { %>
                                 <div class="card mt-3">
                                     <ul class="list-group list-group-flush">
@@ -1563,4 +1563,12 @@
         $('#hide-all').hide();
         return false;
     });
+    $('.modal').on('shown.bs.modal', function () {
+        const height = $(this)[0].scrollHeight
+        const scrollBox = $(this).find('div[class="col-8 modal-height-500"]')
+        // 450是modal没有滚动条时的最大高度,超过则出现滚动条,需要自动下拉到底部
+        if (scrollBox.length && scrollBox[0].scrollHeight > 450) {
+            scrollBox.scrollTop(height);
+        }
+    });
 </script>