Selaa lähdekoodia

新增部位新增清单功能bug修复及调整

ellisran 1 vuosi sitten
vanhempi
commit
a26d935af3

+ 1 - 1
app/controller/change_controller.js

@@ -1484,7 +1484,7 @@ module.exports = app => {
                 // 获取原报dsk数据
                 const accountInfo = await ctx.service.projectAccount.getDataById(change.uid);
                 renderData.dskAccountData = accountInfo && accountInfo.dsk_account ? JSON.parse(accountInfo.dsk_account) : {};
-                renderData.dskProjects = accountInfo && accountInfo.dsk_projects ? JSON.parse(accountInfo.dsk_projects) : [];
+                renderData.dskProjects = accountInfo && accountInfo.dsk_account && accountInfo.dsk_projects ? JSON.parse(accountInfo.dsk_projects) : [];
                 // 台账只读、使用数据
                 renderData.readOnly = !edit;
                 renderData.changing = changing;

+ 7 - 4
app/public/js/change_revise.js

@@ -2712,7 +2712,7 @@ $(document).ready(() => {
                 searchStdNode: function() {
                     const keyword = $(`#${relaSelect.searchText}`).val();
                     searchObj.result = keyword ? dskProjectBills2Tree.tenderTree.nodes.filter(x => {
-                        return x.code.indexOf(keyword) >= 0 || x.name.indexOf(keyword) >= 0;
+                        return (x.code && x.code.indexOf(keyword) >= 0) || (x.name && x.name.indexOf(keyword) >= 0);
                     }) : [];
                     // searchObj.result = [];
                     // for (const x of pathTree.nodes) {
@@ -3282,7 +3282,7 @@ $(document).ready(() => {
                     $('#error-dsk .modal-body').find('h5').eq(1).show();
                     $('#error-dsk .modal-body').find('h5').eq(0).hide();
                     $('#error-dsk').modal('show');
-                    $('#error-dsk .modal-footer').find('a').eq(0).text('注册账号');
+                    $('#error-dsk .modal-footer').find('a').eq(0).text('绑定账号');
                 } else {
                     postData('/profile/dsk/api', { type: 'compilation', getProject: 1, compilationId: getLocalCache(dskCompilation) }, function (result) {
                         let html = '';
@@ -3423,7 +3423,7 @@ $(document).ready(() => {
             const gsSpreadSetting = {
                 cols: [
                     {title: '选择', field: 'selected', hAlign: 1, width: 40, formatter: '@', cellType: 'checkbox', readOnly: true,},
-                    {title: '名称', field: 'name', hAlign: 0, width: 350, formatter: '@', readOnly: true, folderCell: true, cellType: 'tree'},
+                    {title: '名称', field: 'name', hAlign: 0, width: 400, formatter: '@', readOnly: true, folderCell: true, cellType: 'tree'},
                 ],
                 emptyRows: 0,
                 headRows: 1,
@@ -3441,7 +3441,7 @@ $(document).ready(() => {
             gsObj.grSheet = grSpread.getActiveSheet();
             const grSpreadSetting = {
                 cols: [
-                    {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 250, formatter: '@', readOnly: true},
+                    {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 250, formatter: '@', readOnly: true, cellType: 'ellipsisAutoTip', scrollHeightClass: '.modal-height-500'},
                     {title: '所属编办', colSpan: '1', rowSpan: '1', field: 'compilationName', hAlign: 0, width: 150, formatter: '@', readOnly: true},
                 ],
                 emptyRows: 0,
@@ -3554,6 +3554,9 @@ $(document).ready(() => {
                 $('#add-dsk').modal('hide');
             });
         });
+        $('#add-dsk').on('hide.bs.modal', function () {
+            $('#autoTip').hide();
+        });
 
         function setDskProjectSelect(projects) {
             let html = '';

+ 1 - 1
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -1621,7 +1621,7 @@ const SpreadJsObj = {
                                 .css("font", "9pt Arial")
                                 .css("background", "white")
                                 .css("padding", 5)
-                                .css("z-index", 999)
+                                .css("z-index", 9999)
                                 .css("max-width", maxHintWidth)
                                 .css("word-wrap", "break-word")
                                 .attr("id", 'autoTip');

+ 1 - 1
app/service/project_account.js

@@ -1028,7 +1028,7 @@ module.exports = app => {
         }
 
         async unbindDsk(id) {
-            return await this.db.update(this.tableName, { id, dsk_account: null });
+            return await this.db.update(this.tableName, { id, dsk_account: null, dsk_projects: null });
         }
 
         async saveDskProjects(id, projects) {

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

@@ -119,7 +119,7 @@
                             <div class="ml-auto">
                                 <% if (isYb) { %>
                                     <a href="javascript:void(0);" id="get-dsk-bills-btn" class="btn btn-sm btn-light text-primary pull-right mt-1" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="重新获取大司空造价书"><i class="fa fa-refresh" aria-hidden="true"></i></a>
-                                    <a href="javascript:void(0);" id="get-dsk-btn" class="btn btn-sm btn-primary pull-right mt-1 mr-1" style="display: none;">获取计价单价</a>
+                                    <a href="javascript:void(0);" id="get-dsk-btn" class="btn btn-sm btn-primary pull-right mt-1 mr-1" style="display: none;">获取计价项目</a>
                                 <% } %>
                             </div>
                         </nav>

+ 1 - 1
app/view/change/revise_modal.ejs

@@ -81,7 +81,7 @@
             </div>
             <div class="modal-body">
                 <h5>当前账号未绑定手机,请先绑定手机。</h5>
-                <h5 class="text-danger">当前账号未绑定大司空账号,可先进行<a href="/profile/sms" target="_blank" class="text-primary hide-dsk-modal">注册账号</a>或者<a href="/profile/sms" target="_blank" class="text-primary hide-dsk-modal">切换账号</a>绑定。</h5>
+                <h5 class="text-danger">当前账号未绑定大司空账号,请先<a href="/profile/sms" target="_blank" class="text-primary hide-dsk-modal">绑定大司空账号</a>。</h5>
             </div>
             <div class="modal-footer">
                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>

+ 1 - 0
app/view/profile/sms.ejs

@@ -116,6 +116,7 @@
                                                 </div>
                                             </div>
                                             <button class="btn btn-sm btn-primary" id="dsk-bind-btn">确认绑定</button>
+                                            <a class="btn btn-sm btn-outline-primary ml-2" href="//dsk.smartcost.com.cn/register" target="_blank">注册大司空账号</a>
                                         </div>
                                         <div class="form-group show-dsk-account" <% if (!accountData.dsk_account) { %>style="display: none"<% } %>>
                                             <label><%- accountData.dsk_account ? accountData.dsk_account.mobile : '' %></label>