m0_70156489 2 months ago
parent
commit
8e074636b1

+ 8 - 3
application/admin/controller/Procuremenarchive.php

@@ -235,10 +235,12 @@ class Procuremenarchive extends Backend
                         return $orderDir === 'ASC' ? ($ta <=> $tb) : ($tb <=> $ta);
                     });
                 } else {
-                    // 默认 / complete_time:按完结时间;无完结时间的排后面
+                    // 默认 / complete_time:有完结时间按完结时间;无完结则按审批时间
                     usort($merged, function ($a, $b) use ($orderDir) {
-                        $ta = (int)($a['complete_time'] ?? 0);
-                        $tb = (int)($b['complete_time'] ?? 0);
+                        $ca = (int)($a['complete_time'] ?? 0);
+                        $cb = (int)($b['complete_time'] ?? 0);
+                        $ta = $ca > 0 ? $ca : (int)($a['createtime'] ?? 0);
+                        $tb = $cb > 0 ? $cb : (int)($b['createtime'] ?? 0);
                         if ($ta <= 0 && $tb <= 0) {
                             return ((int)($b['id'] ?? 0)) <=> ((int)($a['id'] ?? 0));
                         }
@@ -349,6 +351,9 @@ class Procuremenarchive extends Backend
                     $latestApproveText = date('Y-m-d H:i:s', $latestApproveTs);
                 }
                 $merged['createtime_text'] = ProcuremenTime::formatDisplayDateTime($latestApproveText);
+            } else {
+                $merged['createtime'] = 0;
+                $merged['createtime_text'] = '';
             }
             if ($latestCompleteTs > 0) {
                 $merged['complete_time'] = $latestCompleteTs;

+ 44 - 15
application/admin/view/procuremen/review.html

@@ -455,9 +455,12 @@
     .review-dialog-form .layer-footer .btn + .btn {
         margin-left: 8px;
     }
-    /* 已选单位:高度封顶,避免选中后把下方列表顶矮 */
+    /* 已选单位:整体高度封顶,标签区内滚动,避免多选撑死下方列表 */
     .review-selected-summary {
+        flex: 0 0 auto;
         flex-shrink: 0;
+        display: flex;
+        flex-direction: column;
         margin: 0 0 8px;
         padding: 6px 8px;
         background: #fafbfc;
@@ -465,9 +468,8 @@
         border-radius: 3px;
         font-size: 12px;
         line-height: 1.4;
-        height: 52px;
         min-height: 52px;
-        max-height: 52px;
+        max-height: 110px;
         overflow: hidden;
         box-sizing: border-box;
     }
@@ -476,8 +478,9 @@
         flex-wrap: nowrap;
         align-items: center;
         gap: 10px 14px;
-        margin: 0 0 6px;
+        margin: 0 0 4px;
         min-width: 0;
+        flex-shrink: 0;
     }
     .review-selected-summary .review-selected-head {
         margin: 0;
@@ -490,27 +493,49 @@
         font-weight: 700;
         color: #3c8dbc;
     }
+    .review-selected-summary .review-selected-slot {
+        position: relative;
+        flex: 1 1 auto;
+        min-height: 24px;
+        max-height: 78px;
+        overflow: hidden;
+    }
     .review-selected-summary .review-selected-empty {
-        display: none;
         margin: 0;
         color: #999;
         font-size: 12px;
+        line-height: 24px;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
     }
     .review-selected-summary .review-selected-tags {
         display: flex;
         flex-wrap: wrap;
-        gap: 6px 8px;
+        gap: 4px 6px;
+        align-content: flex-start;
         align-items: flex-start;
-        max-height: 104px;
+        height: 100%;
+        max-height: 78px;
+        overflow-x: hidden;
         overflow-y: auto;
+        -webkit-overflow-scrolling: touch;
         margin: 0;
+        padding-right: 2px;
+    }
+    .review-selected-summary.is-empty .review-selected-tags {
+        display: none;
+    }
+    .review-selected-summary:not(.is-empty) .review-selected-empty {
+        display: none;
     }
     .review-selected-summary .review-selected-chip {
         display: inline-flex;
-        align-items: flex-start;
+        align-items: center;
         max-width: 100%;
-        padding: 2px 4px 2px 8px;
+        padding: 1px 4px 1px 8px;
         gap: 2px;
+        height: 22px;
         font-size: 12px;
         color: #2c6f9c;
         background: #e8f4fb;
@@ -521,9 +546,11 @@
     .review-selected-summary .review-chip-text {
         flex: 1 1 auto;
         min-width: 0;
-        word-break: break-all;
+        max-width: 14em;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
         line-height: 1.35;
-        padding-top: 1px;
     }
     .review-selected-summary .review-chip-remove {
         flex: 0 0 auto;
@@ -534,7 +561,7 @@
         color: #c9302c;
         font-size: 15px;
         font-weight: 700;
-        line-height: 1.1;
+        line-height: 1;
         cursor: pointer;
         vertical-align: middle;
     }
@@ -650,7 +677,7 @@
                 {/if}
             </div>
         </div>
-        <div class="review-selected-summary" id="review-selected-summary" aria-live="polite">
+        <div class="review-selected-summary is-empty" id="review-selected-summary" aria-live="polite">
             <div class="review-selected-top">
                 <div class="review-selected-head">
                     已选单位(<span class="review-selected-count" id="review-selected-count">0</span>)
@@ -660,8 +687,10 @@
                     <strong>重要提示:</strong>确认后将向所选供应商<strong>发送短信与邮件</strong>,请仔细核对后再提交。
                 </p>
             </div>
-            <p class="review-selected-empty" id="review-selected-empty">暂未选择供应商</p>
-            <div class="review-selected-tags" id="review-selected-tags"></div>
+            <div class="review-selected-slot">
+                <p class="review-selected-empty" id="review-selected-empty">暂未选择供应商</p>
+                <div class="review-selected-tags" id="review-selected-tags"></div>
+            </div>
         </div>
         <div class="review-split-right">
             <div class="review-company-panel">

+ 12 - 4
application/index/view/index/deliveryscore.html

@@ -11,7 +11,13 @@
     <link rel="apple-touch-icon" href="{:htmlentities(default_admin_avatar_url())}">
     <style>
         * { box-sizing: border-box; }
-        html, body { margin: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f5f5; color: #333; }
+        /* 禁微信/邮件内置浏览器自动放大中文(深链进入时侧栏「待确认」等易被撑大) */
+        html {
+            -webkit-text-size-adjust: 100%;
+            text-size-adjust: 100%;
+            font-size: 14px;
+        }
+        html, body { margin: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f5f5; color: #333; font-size: 14px; }
         :root {
             --bar-h: 52px;
             --tabbar-h: 52px;
@@ -28,7 +34,7 @@
         }
         .bar h1 {
             position: absolute; left: 0; right: 0;
-            margin: 0; font-size: 1.05rem; font-weight: 600;
+            margin: 0; font-size: 16px; font-weight: 600;
             text-align: center; pointer-events: none;
         }
         .bar a {
@@ -69,10 +75,12 @@
             border-right: 1px solid #e5e5e5; padding-top: 8px; overflow-y: auto;
         }
         .side .cat {
-            display: block; width: 100%; padding: 14px 6px; border: none;
-            background: transparent; color: #555; font-size: 13px;
+            display: block; width: 100%; padding: 14px 4px; border: none;
+            background: transparent; color: #555; font-size: 12px;
             text-align: center; line-height: 1.35; font-family: inherit;
             -webkit-tap-highlight-color: transparent;
+            -webkit-text-size-adjust: 100%;
+            text-size-adjust: 100%;
         }
         .side .cat.active {
             background: #f0f7fb; color: #3c8dbc; font-weight: 600;

+ 12 - 4
application/index/view/index/inboundscore.html

@@ -11,7 +11,13 @@
     <link rel="apple-touch-icon" href="{:htmlentities(default_admin_avatar_url())}">
     <style>
         * { box-sizing: border-box; }
-        html, body { margin: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f5f5; color: #333; }
+        /* 禁微信/邮件内置浏览器自动放大中文(深链进入时侧栏「待确认」等易被撑大) */
+        html {
+            -webkit-text-size-adjust: 100%;
+            text-size-adjust: 100%;
+            font-size: 14px;
+        }
+        html, body { margin: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f5f5f5; color: #333; font-size: 14px; }
         :root {
             --bar-h: 52px;
             --tabbar-h: 52px;
@@ -28,7 +34,7 @@
         }
         .bar h1 {
             position: absolute; left: 0; right: 0;
-            margin: 0; font-size: 1.05rem; font-weight: 600;
+            margin: 0; font-size: 16px; font-weight: 600;
             text-align: center; pointer-events: none;
         }
         .bar a {
@@ -69,10 +75,12 @@
             border-right: 1px solid #e5e5e5; padding-top: 8px; overflow-y: auto;
         }
         .side .cat {
-            display: block; width: 100%; padding: 14px 6px; border: none;
-            background: transparent; color: #555; font-size: 13px;
+            display: block; width: 100%; padding: 14px 4px; border: none;
+            background: transparent; color: #555; font-size: 12px;
             text-align: center; line-height: 1.35; font-family: inherit;
             -webkit-tap-highlight-color: transparent;
+            -webkit-text-size-adjust: 100%;
+            text-size-adjust: 100%;
         }
         .side .cat.active {
             background: #f0f7fb; color: #3c8dbc; font-weight: 600;

+ 177 - 82
public/assets/js/backend/procuremen.js

@@ -759,12 +759,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 if (!$.isArray(ymList) || !ymList.length) {
                     return;
                 }
+                // 月份列表未变则不重绘侧栏,避免搜索刷新时打断焦点
+                var norm = ymList.map(function (ym) {
+                    return String(ym || '');
+                }).filter(function (ym) {
+                    return /^\d{4}-\d{2}$/.test(ym);
+                });
+                var sig = norm.slice().sort().join(',');
+                if (Controller._sidebarYmSig === sig && $('.procuremen-sidebar .procuremen-ym-item').length) {
+                    return;
+                }
+                Controller._sidebarYmSig = sig;
                 var byYear = {};
-                ymList.forEach(function (ym) {
-                    ym = String(ym || '');
-                    if (!/^\d{4}-\d{2}$/.test(ym)) {
-                        return;
-                    }
+                norm.forEach(function (ym) {
                     var y = ym.substring(0, 4);
                     var mo = parseInt(ym.substring(5, 7), 10) || 1;
                     if (!byYear[y]) {
@@ -796,12 +803,109 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 }
             }
 
+            function procuremenNormalizeToolbarRight($ft) {
+                if (!$ft || !$ft.length) {
+                    return;
+                }
+                var $search = $ft.find('.search').first();
+                if (!$search.length) {
+                    return;
+                }
+                // 专用右侧容器:不能把 .search 自身当 wrap(.search 的 display 会盖掉 flex,导致搜索与图标折成两行)
+                var $right = $ft.children('.procuremen-toolbar-search-wrap').first();
+                if (!$right.length) {
+                    $right = $('<div class="columns columns-right pull-right procuremen-toolbar-search-wrap"></div>');
+                    $ft.append($right);
+                } else {
+                    $right.addClass('columns columns-right pull-right procuremen-toolbar-search-wrap');
+                }
+                // 若历史上把图标塞进了 .search 里,先拆出来
+                if ($search.hasClass('procuremen-toolbar-search-wrap')) {
+                    $search.removeClass('procuremen-toolbar-search-wrap columns columns-right');
+                }
+                $search.children().not('input, .form-control').appendTo($right);
+                if ($search.parent()[0] !== $right[0]) {
+                    $search.appendTo($right);
+                }
+
+                $ft.children().each(function () {
+                    var $c = $(this);
+                    if ($c.is('.bars, .bs-bars') || $c[0] === $right[0] || $c.hasClass('search')) {
+                        return;
+                    }
+                    var mergeToolbarExtras = $c.hasClass('columns')
+                        || $c.hasClass('pull-right')
+                        || ($c.hasClass('btn-group') && $c.find('.search').length === 0)
+                        || $c.is('button[name="commonSearch"], button[name="toggle"]');
+                    if (!mergeToolbarExtras) {
+                        return;
+                    }
+                    if ($c.hasClass('btn-group') && !$c.hasClass('columns')) {
+                        $c.appendTo($right);
+                    } else if ($c.is('button')) {
+                        $c.appendTo($right);
+                    } else {
+                        $c.children().appendTo($right);
+                        if (!$c.children().length) {
+                            $c.remove();
+                        }
+                    }
+                });
+                // 顺序:搜索框 → 切换 → 列显隐 → 导出 → 通用搜索(放大镜)
+                // 已在正确位置则勿再 prepend/insert(否则每次刷新会挪动 input,线上输入时反复失焦)
+                $right.addClass('procuremen-toolbar-search-wrap');
+                var $toggle = $right.find('button[name="toggle"]').first();
+                var $columns = $right.find('.keep-open').first();
+                var $export = $right.find('.export').first();
+                var $common = $right.find('button[name="commonSearch"]').first();
+                $search = $right.find('.search').first();
+                function moveIfNeeded($node, $ref, asFirst) {
+                    if (!$node || !$node.length) {
+                        return;
+                    }
+                    if (asFirst) {
+                        if ($right.children().first()[0] !== $node[0]) {
+                            $node.prependTo($right);
+                        }
+                        return;
+                    }
+                    if (!$ref || !$ref.length) {
+                        if ($node.parent()[0] !== $right[0]) {
+                            $node.appendTo($right);
+                        }
+                        return;
+                    }
+                    if ($node.prev()[0] !== $ref[0]) {
+                        $node.insertAfter($ref);
+                    }
+                }
+                moveIfNeeded($search, null, true);
+                moveIfNeeded($toggle, $search, false);
+                moveIfNeeded($columns, $toggle.length ? $toggle : $search, false);
+                var $afterCols = $columns.length ? $columns : ($toggle.length ? $toggle : $search);
+                moveIfNeeded($export, $afterCols, false);
+                if ($common.length && $right.children().last()[0] !== $common[0]) {
+                    $common.appendTo($right);
+                }
+            }
+
             function procuremenPlaceToolbar() {
                 var $host = $('#procuremen-toolbar-host');
                 var $bt = table.closest('.bootstrap-table');
                 if (!$host.length || !$bt.length) {
                     return;
                 }
+                var $focusInp = $(document.activeElement);
+                var keepSearchFocus = $focusInp.length
+                    && $focusInp.is('input')
+                    && $focusInp.closest('.search').length
+                    && ($focusInp.closest('#procuremen-toolbar-host').length || $focusInp.closest($bt).length);
+                var caretStart = null;
+                var caretEnd = null;
+                if (keepSearchFocus && $focusInp[0] && typeof $focusInp[0].selectionStart === 'number') {
+                    caretStart = $focusInp[0].selectionStart;
+                    caretEnd = $focusInp[0].selectionEnd;
+                }
                 $host.show().css({
                     display: 'block',
                     height: '',
@@ -823,11 +927,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     // 每次都校正右侧顺序,保证贴右且图标顺序与图二一致
                     procuremenNormalizeToolbarRight($hostFt);
                     procuremenBindToolbarDropdownFix();
-                    if (typeof Controller._procuremenApplyStageButtons === 'function') {
-                        Controller._procuremenApplyStageButtons();
+                if (typeof Controller._procuremenApplyStageButtons === 'function') {
+                    Controller._procuremenApplyStageButtons();
+                }
+                if (keepSearchFocus) {
+                    var $restore = $host.find('.search input').first();
+                    if ($restore.length) {
+                        $restore.focus();
+                        if (caretStart != null) {
+                            try {
+                                $restore[0].setSelectionRange(caretStart, caretEnd != null ? caretEnd : caretStart);
+                            } catch (ignoreCaret) {
+                            }
+                        }
                     }
-                    return;
                 }
+                $host.find('.search input').attr('placeholder', '回车搜索').attr('autocomplete', 'off');
+                return;
+            }
 
                 // 把表格内工具栏挪到宿主(脱离 overflow:hidden,避免上半截被裁切)
                 var $ft = $btFt.length ? $btFt : $hostFt;
@@ -852,6 +969,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 if (typeof Controller._procuremenApplyStageButtons === 'function') {
                     Controller._procuremenApplyStageButtons();
                 }
+                if (keepSearchFocus) {
+                    var $restore2 = $host.find('.search input').first();
+                    if ($restore2.length) {
+                        $restore2.focus();
+                        if (caretStart != null) {
+                            try {
+                                $restore2[0].setSelectionRange(caretStart, caretEnd != null ? caretEnd : caretStart);
+                            } catch (ignoreCaret2) {
+                            }
+                        }
+                    }
+                }
+                $host.find('.search input').attr('placeholder', '回车搜索').attr('autocomplete', 'off');
                 // 工具栏移出后重算表高,避免占位错乱
                 setTimeout(function () {
                     procuremenTableHeightCached = 0;
@@ -862,77 +992,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 }, 0);
             }
 
-            function procuremenNormalizeToolbarRight($ft) {
-                if (!$ft || !$ft.length) {
-                    return;
-                }
-                var $search = $ft.find('.search').first();
-                if (!$search.length) {
-                    return;
-                }
-                // 专用右侧容器:不能把 .search 自身当 wrap(.search 的 display 会盖掉 flex,导致搜索与图标折成两行)
-                var $right = $ft.children('.procuremen-toolbar-search-wrap').first();
-                if (!$right.length) {
-                    $right = $('<div class="columns columns-right pull-right procuremen-toolbar-search-wrap"></div>');
-                    $ft.append($right);
-                } else {
-                    $right.addClass('columns columns-right pull-right procuremen-toolbar-search-wrap');
-                }
-                // 若历史上把图标塞进了 .search 里,先拆出来
-                if ($search.hasClass('procuremen-toolbar-search-wrap')) {
-                    $search.removeClass('procuremen-toolbar-search-wrap columns columns-right');
-                }
-                $search.children().not('input, .form-control').appendTo($right);
-                $search.appendTo($right);
-
-                $ft.children().each(function () {
-                    var $c = $(this);
-                    if ($c.is('.bars, .bs-bars') || $c[0] === $right[0] || $c.hasClass('search')) {
-                        return;
-                    }
-                    var mergeToolbarExtras = $c.hasClass('columns')
-                        || $c.hasClass('pull-right')
-                        || ($c.hasClass('btn-group') && $c.find('.search').length === 0)
-                        || $c.is('button[name="commonSearch"], button[name="toggle"]');
-                    if (!mergeToolbarExtras) {
-                        return;
-                    }
-                    if ($c.hasClass('btn-group') && !$c.hasClass('columns')) {
-                        $c.appendTo($right);
-                    } else if ($c.is('button')) {
-                        $c.appendTo($right);
-                    } else {
-                        $c.children().appendTo($right);
-                        if (!$c.children().length) {
-                            $c.remove();
-                        }
-                    }
-                });
-                // 顺序:搜索框 → 切换 → 列显隐 → 导出 → 通用搜索(放大镜)
-                $right.addClass('procuremen-toolbar-search-wrap');
-                var $toggle = $right.find('button[name="toggle"]').first();
-                var $columns = $right.find('.keep-open').first();
-                var $export = $right.find('.export').first();
-                var $common = $right.find('button[name="commonSearch"]').first();
-                $search = $right.find('.search').first();
-                if ($search.length) {
-                    $search.prependTo($right);
-                }
-                if ($toggle.length) {
-                    $toggle.insertAfter($search);
-                }
-                if ($columns.length) {
-                    $columns.insertAfter($toggle.length ? $toggle : $search);
-                }
-                if ($export.length) {
-                    var $afterCols = $columns.length ? $columns : ($toggle.length ? $toggle : $search);
-                    $export.insertAfter($afterCols);
-                }
-                if ($common.length) {
-                    $common.appendTo($right);
-                }
-            }
-
             /** 列显隐下拉用 fixed,避免被表格区域 overflow 裁切 */
             function procuremenBindToolbarDropdownFix() {
                 var $host = $('#procuremen-toolbar-host');
@@ -1859,6 +1918,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 showColumns: true,
                 showExport: true,
                 search: true,
+                // 回车再搜:避免每敲一字就请求(线上跨月扫 Redis 很重,表现为输入时不断刷新/失焦)
+                searchOnEnterKey: true,
+                searchTimeOut: 800,
                 smartDisplay: false,
                 // 请求发出即显示加载态
                 // 注意:勿在 ajaxOptions 里覆盖 beforeSend,否则会冲掉 Fast.api.fixurl,
@@ -1879,7 +1941,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         if (!/^\d{4}-\d{2}$/.test(pickYm) || res.sidebarYms.indexOf(pickYm) < 0) {
                             pickYm = String(res.sidebarYms[0] || '');
                         }
-                        if (/^\d{4}-\d{2}$/.test(pickYm) && pickYm !== Controller.currYm) {
+                        var searchTextNow = '';
+                        try {
+                            searchTextNow = $.trim((table.bootstrapTable('getOptions') || {}).searchText || '');
+                        } catch (ignoreSearchText) {
+                            searchTextNow = '';
+                        }
+                        if (!searchTextNow) {
+                            var $searchInp = $('#procuremen-toolbar-host .search input, .bootstrap-table .search input').first();
+                            if ($searchInp.length) {
+                                searchTextNow = $.trim($searchInp.val() || '');
+                            }
+                        }
+                        // 搜索中不要自动切月份再 refresh,否则输入框像被反复刷新
+                        if (!searchTextNow && /^\d{4}-\d{2}$/.test(pickYm) && pickYm !== Controller.currYm) {
                             Controller.currYm = pickYm;
                             $('.procuremen-ym-item').removeClass('active');
                             $('.procuremen-ym-item[data-ym="' + pickYm + '"]').addClass('active');
@@ -1944,6 +2019,26 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             // 本页不需要「跨页选择模式」提示
             table.closest('.bootstrap-table').find('.btn-selected-tips').remove();
             $('#procuremen-toolbar-host .btn-selected-tips, #toolbar .btn-selected-tips').remove();
+            // 快速搜索:禁止回车触发表单整页刷新;仍放行给 bootstrap-table(searchOnEnterKey)
+            $(document).off('keydown.procuremenQuickSearch', '#procuremen-toolbar-host .search input, .bootstrap-table .fixed-table-toolbar .search input')
+                .on('keydown.procuremenQuickSearch', '#procuremen-toolbar-host .search input, .bootstrap-table .fixed-table-toolbar .search input', function (e) {
+                    if (e.keyCode === 13 || e.which === 13) {
+                        e.preventDefault();
+                    }
+                });
+            $(document).off('submit.procuremenQuickSearch', 'form')
+                .on('submit.procuremenQuickSearch', 'form', function (e) {
+                    if ($(document.activeElement).closest('#procuremen-toolbar-host .search, .bootstrap-table .search').length) {
+                        e.preventDefault();
+                        return false;
+                    }
+                });
+            // 占位提示:回车搜索(线上勿逐字请求)
+            setTimeout(function () {
+                $('#procuremen-toolbar-host .search input, .bootstrap-table .fixed-table-toolbar .search input')
+                    .attr('placeholder', '回车搜索')
+                    .attr('autocomplete', 'off');
+            }, 0);
             procuremenInjectHeaderFilters();
             table.on('post-body.bs.table post-header.bs.table', function () {
                 $('#procuremen-toolbar-host .btn-selected-tips, .bootstrap-table .btn-selected-tips, #toolbar .btn-selected-tips').remove();
@@ -4710,13 +4805,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     return a.label.localeCompare(b.label, 'zh-CN');
                 });
                 var n = entries.length;
+                var $summary = $('#review-selected-summary');
                 $('#review-selected-count').text(String(n));
+                $summary.toggleClass('is-empty', n === 0);
                 $('#review-selected-tags').empty();
                 if (!n) {
-                    $('#review-selected-empty').show();
                     return;
                 }
-                $('#review-selected-empty').hide();
                 $.each(entries, function (i, e) {
                     var $chip = $('<span class="review-selected-chip"/>').attr('title', e.label);
                     $chip.data('reviewSelKey', e.k);

+ 12 - 8
public/assets/js/backend/procuremenarchive.js

@@ -128,17 +128,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             autocomplete: false,
                             width: 165,
                             formatter: function (value, row) {
-                                if (row.createtime_text) {
-                                    return row.createtime_text;
+                                var text = row && row.createtime_text != null ? String(row.createtime_text).trim() : '';
+                                if (text && text !== '-' && text !== '—') {
+                                    return text;
                                 }
-                                if (value == null || value === '') {
+                                if (value == null || value === '' || value === 0 || value === '0') {
                                     return '';
                                 }
                                 var n = parseInt(value, 10);
                                 if (!isNaN(n) && n > 946684800) {
                                     return Table.api.formatter.datetime.call(this, value, row);
                                 }
-                                return String(value);
+                                var s = String(value).trim();
+                                return (s === '-' || s === '—') ? '' : s;
                             }
                         },
                         {
@@ -148,17 +150,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             sortable: true,
                             width: 165,
                             formatter: function (value, row) {
-                                if (row.complete_time_text) {
-                                    return row.complete_time_text;
+                                var text = row && row.complete_time_text != null ? String(row.complete_time_text).trim() : '';
+                                if (text && text !== '-' && text !== '—') {
+                                    return text;
                                 }
                                 if (value == null || value === '' || value === 0 || value === '0') {
-                                    return '<span class="text-muted">—</span>';
+                                    return '';
                                 }
                                 var n = parseInt(value, 10);
                                 if (!isNaN(n) && n > 946684800) {
                                     return Table.api.formatter.datetime.call(this, value, row);
                                 }
-                                return String(value);
+                                var s = String(value).trim();
+                                return (s === '-' || s === '—') ? '' : s;
                             }
                         },
                         {