m0_70156489 2 godzin temu
rodzic
commit
eefe82b003

+ 11 - 13
application/admin/controller/Index.php

@@ -70,28 +70,28 @@ class Index extends Backend
     }
 
     /**
-     * 生产协同系统登录(login.html)— 仅角色组根 10 树可登录
+     * 登录页 login.html:按 mproc.login_page_system 锁定可登录账号与风格
      */
     public function login()
     {
-        return $this->doSystemLogin('collab', 'login');
+        SystemLogin::loadConfig();
+        $systemKey = SystemLogin::normalizeKey((string)Config::get('mproc.login_page_system'));
+
+        return $this->doSystemLogin($systemKey);
     }
 
     /**
-     * 生产经营驾驶舱登录(生产经营驾驶舱系统.html)— 仅角色组根 2 树可登录
+     * 兼容旧链接
      */
     public function cockpitlogin()
     {
-        return $this->doSystemLogin('cockpit', '生产经营驾驶舱系统');
+        $this->redirect('index/login', $this->request->get(), 302);
     }
 
     /**
-     * 按登录页入口锁定系统:页面是哪个系统,就只允许该系统账号
-     *
      * @param string $systemKey collab|cockpit
-     * @param string $viewName  模板名
      */
-    protected function doSystemLogin(string $systemKey, string $viewName)
+    protected function doSystemLogin(string $systemKey)
     {
         SystemLogin::loadConfig();
         $systemKey = SystemLogin::normalizeKey($systemKey);
@@ -145,7 +145,6 @@ class Index extends Backend
             $keeptime = $keeyloginhours * 3600;
             $result = $this->auth->login($username, $password, $keeptime);
             if ($result === true) {
-                // 以当前登录页对应系统为准(与页面标题一致),不属于则拒绝
                 if (!SystemLogin::belongsTo($this->auth, (int)$this->auth->id, $systemKey)) {
                     $this->auth->logout();
                     Session::delete('login_system');
@@ -179,20 +178,19 @@ class Index extends Backend
         $this->view->assign('login_system', $systemKey);
         $this->view->assign('title', $sysName . ' - ' . __('Login'));
         Hook::listen("admin_login_init", $this->request);
-        return $this->view->fetch($viewName);
+        return $this->view->fetch('login');
     }
 
     /**
-     * 退出登录:回到对应系统登录页
+     * 退出登录
      */
     public function logout()
     {
-        $system = Session::get('login_system') ?: 'collab';
         if ($this->request->isPost()) {
             $this->auth->logout();
             Session::delete('login_system');
             Hook::listen("admin_logout_after", $this->request);
-            $this->redirect($system === 'cockpit' ? 'index/cockpitlogin' : 'index/login');
+            $this->redirect('index/login');
         }
         $html = "<form id='logout_submit' name='logout_submit' action='' method='post'>" . token() . "<input type='submit' value='ok' style='display:none;'></form>";
         $html .= "<script>document.forms['logout_submit'].submit();</script>";

+ 8 - 7
application/admin/controller/Procuremen.php

@@ -3432,13 +3432,14 @@ class Procuremen extends Backend
                 continue;
             }
             $db = $byId[$sid];
-            if (array_key_exists('This_quantity', $db) && $db['This_quantity'] !== null && $db['This_quantity'] !== '') {
-                $rw['This_quantity'] = $db['This_quantity'];
-            }
-            if (array_key_exists('ceilingPrice', $db) && $db['ceilingPrice'] !== null && $db['ceilingPrice'] !== '') {
-                $rw['ceilingPrice'] = $db['ceilingPrice'];
-            } elseif (array_key_exists('ceiling_price', $db) && $db['ceiling_price'] !== null && $db['ceiling_price'] !== '') {
-                $rw['ceilingPrice'] = $db['ceiling_price'];
+            // 有 purchase_order 记录时同步数量/限价(含清空后的空串,避免刷新后又冒出来)
+            if (array_key_exists('This_quantity', $db)) {
+                $rw['This_quantity'] = $db['This_quantity'] === null ? '' : $db['This_quantity'];
+            }
+            if (array_key_exists('ceilingPrice', $db)) {
+                $rw['ceilingPrice'] = $db['ceilingPrice'] === null ? '' : $db['ceilingPrice'];
+            } elseif (array_key_exists('ceiling_price', $db)) {
+                $rw['ceilingPrice'] = $db['ceiling_price'] === null ? '' : $db['ceiling_price'];
             }
         }
         unset($rw);

+ 77 - 0
application/admin/controller/Procuremenexport.php

@@ -87,6 +87,7 @@ class Procuremenexport extends Backend
             }
             try {
                 $rows = $this->buildExportableOrderRows($ym);
+                $rows = $this->filterExportableRowsBySearch($rows);
 
                 return json(['total' => count($rows), 'rows' => $rows, 'ym' => $ym]);
             } catch (\Throwable $e) {
@@ -118,6 +119,82 @@ class Procuremenexport extends Backend
         }
     }
 
+    /**
+     * 快速搜索 / 通用搜索过滤(本页数据已按月聚合,在内存中筛选)
+     *
+     * @param array<int, array<string, mixed>> $rows
+     * @return array<int, array<string, mixed>>
+     */
+    protected function filterExportableRowsBySearch(array $rows): array
+    {
+        $keyword = trim((string)$this->request->request('search', ''));
+        if ($keyword === '') {
+            $keyword = trim((string)$this->request->get('search', ''));
+        }
+
+        $filter = $this->request->get('filter', '');
+        $op = $this->request->get('op', '');
+        if (is_string($filter) && $filter !== '') {
+            $filterArr = (array)json_decode($filter, true);
+        } else {
+            $filterArr = is_array($filter) ? $filter : [];
+        }
+        if (is_string($op) && $op !== '') {
+            $opArr = (array)json_decode($op, true);
+        } else {
+            $opArr = is_array($op) ? $op : [];
+        }
+
+        if ($keyword === '' && $filterArr === []) {
+            return $rows;
+        }
+
+        $searchFields = ['CCYDH', 'CYJMC', 'CGYMC', 'createtime_text', 'ym'];
+        $out = [];
+        foreach ($rows as $row) {
+            if (!is_array($row)) {
+                continue;
+            }
+            if ($keyword !== '') {
+                $hit = false;
+                foreach ($searchFields as $f) {
+                    if (mb_stripos((string)($row[$f] ?? ''), $keyword) !== false) {
+                        $hit = true;
+                        break;
+                    }
+                }
+                if (!$hit) {
+                    continue;
+                }
+            }
+            $passFilter = true;
+            foreach ($filterArr as $field => $val) {
+                $field = (string)$field;
+                $val = trim((string)$val);
+                if ($field === '' || $val === '') {
+                    continue;
+                }
+                $cell = (string)($row[$field] ?? '');
+                $mode = strtoupper((string)($opArr[$field] ?? 'LIKE'));
+                if ($mode === '=' || $mode === 'EQUAL') {
+                    if (strcasecmp($cell, $val) !== 0) {
+                        $passFilter = false;
+                        break;
+                    }
+                } elseif (mb_stripos($cell, $val) === false) {
+                    $passFilter = false;
+                    break;
+                }
+            }
+            if (!$passFilter) {
+                continue;
+            }
+            $out[] = $row;
+        }
+
+        return $out;
+    }
+
     /**
      * 已完结订单(与历史存证一致),按完结月份筛选后合并为一单一行
      *

+ 32 - 15
application/admin/library/SystemLogin.php

@@ -45,19 +45,31 @@ class SystemLogin
     {
         self::loadConfig();
         $systemKey = self::normalizeKey($systemKey);
-        $val = Config::get('systems.' . $systemKey . '.' . $key);
-        if ($val !== null && $val !== '') {
-            return $val;
-        }
-        if ($systemKey === 'collab') {
-            if ($key === 'allowed_group_roots') {
+
+        // 分组根:优先读 mproc(改 mproc 立即生效,不被 systems.php 盖住)
+        if ($key === 'allowed_group_roots') {
+            if ($systemKey === 'collab') {
                 $root = (int)Config::get('mproc.collab_login_group_root_id');
                 if ($root <= 0) {
                     $root = (int)Config::get('mproc.bid_open_auth_group_root_id');
                 }
-
-                return $root > 0 ? [$root] : $default;
+                if ($root > 0) {
+                    return [$root];
+                }
+            }
+            if ($systemKey === 'cockpit') {
+                $roots = Config::get('mproc.cockpit_login_group_root_ids');
+                if (is_array($roots) && $roots !== []) {
+                    return $roots;
+                }
             }
+        }
+
+        $val = Config::get('systems.' . $systemKey . '.' . $key);
+        if ($val !== null && $val !== '') {
+            return $val;
+        }
+        if ($systemKey === 'collab') {
             if ($key === 'name' || $key === 'brand') {
                 if ($key === 'brand') {
                     $brand = Config::get('mproc.collab_system_brand');
@@ -71,15 +83,15 @@ class SystemLogin
                 return '生产协同系统';
             }
             if ($key === 'allow_rule_super') {
-                return false;
+                $v = Config::get('mproc.collab_allow_rule_super');
+                if ($v === null) {
+                    return true;
+                }
+
+                return (bool)$v;
             }
         }
         if ($systemKey === 'cockpit') {
-            if ($key === 'allowed_group_roots') {
-                $roots = Config::get('mproc.cockpit_login_group_root_ids');
-
-                return is_array($roots) ? $roots : $default;
-            }
             if ($key === 'name') {
                 return '生产经营驾驶舱系统';
             }
@@ -92,7 +104,12 @@ class SystemLogin
                 return $brand ?: '浙江印刷集团有限公司';
             }
             if ($key === 'allow_rule_super') {
-                return (bool)Config::get('mproc.cockpit_allow_rule_super');
+                $v = Config::get('mproc.cockpit_allow_rule_super');
+                if ($v === null) {
+                    return true;
+                }
+
+                return (bool)$v;
             }
         }
 

+ 0 - 13
application/admin/view/common/menu.html

@@ -11,19 +11,6 @@
         </div>
     </div>
 
-    <!-- 菜单搜索 -->
-    <form action="" method="get" class="sidebar-form" onsubmit="return false;">
-        <div class="input-group">
-            <input type="text" name="q" class="form-control" placeholder="{:__('Search menu')}">
-            <span class="input-group-btn">
-                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
-                </button>
-            </span>
-            <div class="menuresult list-group sidebar-form hide">
-            </div>
-        </div>
-    </form>
-
     <!-- 移动端一级菜单 -->
     <div class="mobilenav visible-xs">
 

+ 0 - 1
application/admin/view/index/login.html

@@ -652,7 +652,6 @@
                 <!--@AdminLoginFormBegin-->
                 <div id="errtips" class="hide"></div>
                 {:token()}
-                <input type="hidden" name="system" value="collab"/>
                 <div class="login-field">
                     <div class="login-input">
                         <span class="login-input-icon">

+ 1 - 1
application/admin/view/procuremen/emaillog.html

@@ -4,7 +4,7 @@
     <div class="panel-body procuremen-email-log-page">
         <div class="widget-body no-padding">
             <div id="toolbar" class="toolbar">
-                <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i></a>
+                <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i> 刷新</a>
             </div>
             <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                    data-operate-edit="false"

+ 425 - 100
application/admin/view/procuremen/index.html

@@ -1,21 +1,35 @@
 <style>
-    /* 工具栏贴右时避免被裁切;主内容区约束宽度,表格在内部横向滚动 */
-    #content:has(#procuremen-layout),
-    #content .col-xs-12:has(#procuremen-layout),
-    div.content:has(#procuremen-layout) {
-        overflow-x: hidden !important;
+    /* 本页在 iframe 内:收紧外层边距,但保留少量内边距,避免左侧月份栏/上方工具栏被裁切 */
+    html, body.inside-aside, body.inside-header {
+        margin: 0 !important;
+        padding: 0 !important;
+        background: #fff !important;
+    }
+    #main,
+    #content,
+    .tab-content.tab-addtabs {
+        margin-left: 0 !important;
+        margin-right: 0 !important;
     }
-    div.content:has(#procuremen-layout) {
-        padding-top: 0 !important;
-        padding-bottom: 0 !important;
+    .content {
+        padding: 10px 8px 0 8px !important;
     }
     #procuremen-layout > .panel-body {
-        padding-top: 16px !important;
-        padding-bottom: 0 !important;
+        padding: 4px 0 0 0 !important;
+    }
+    #procuremen-layout.panel-default,
+    #procuremen-layout.panel-intro {
+        margin: 0 !important;
+        border-radius: 0 !important;
+        border-left: none !important;
+        border-right: none !important;
+        border-top: none !important;
+        box-shadow: none !important;
     }
     #procuremen-layout.panel-intro > .panel-heading {
-        padding-top: 0 !important;
-        padding-bottom: 0 !important;
+        padding: 8px 8px 0 8px !important;
+        overflow: visible;
+        min-height: 0;
     }
     #procuremen-layout.panel-intro > .panel-heading .panel-lead {
         margin-bottom: 0;
@@ -25,12 +39,15 @@
         padding: 0;
         margin: 0;
     }
-    .procuremen-layout { margin: 0 -10px; }
-    /* 左右列等高:与右侧整块(工具条+Tab+表格+分页)对齐;桌面下取消 float 用 flex */
+    /* 月份栏与表格并排:主区 width:0 + flex:1,防止撑破导致左侧列被裁切 */
+    .procuremen-layout { margin: 0 !important; }
     #procuremen-layout .procuremen-layout.row {
-        display: flex;
-        flex-wrap: wrap;
+        display: flex !important;
+        flex-direction: row !important;
+        flex-wrap: nowrap !important;
         align-items: stretch;
+        margin-left: 0 !important;
+        margin-right: 0 !important;
     }
     @media (min-width: 768px) {
         #procuremen-layout .procuremen-layout.row {
@@ -41,32 +58,73 @@
             float: none !important;
             display: flex;
             flex-direction: column;
+            padding-left: 0 !important;
+            padding-right: 0 !important;
         }
         #procuremen-layout .procuremen-layout > .procuremen-sidebar {
-            flex: 0 0 92px;
-            max-width: 92px;
-            width: 92px !important;
+            flex: 0 0 96px !important;
+            max-width: 96px !important;
+            width: 96px !important;
+            min-width: 96px !important;
+        }
+        #procuremen-layout .procuremen-layout > .procuremen-main {
+            flex: 1 1 0% !important;
+            width: 0 !important;
+            max-width: none !important;
+            min-width: 0 !important;
         }
     }
     #procuremen-layout .procuremen-main {
-        overflow-x: hidden !important;
-        overflow-y: visible;
-        padding-right: 8px !important;
+        overflow: hidden !important;
+        padding-left: 0 !important;
+        padding-right: 0 !important;
         flex: 1 1 0%;
         min-width: 0;
+        width: 0;
+        max-width: none !important;
+        background: #fff;
+        position: relative;
+        z-index: 0;
     }
     .procuremen-sidebar {
-        flex: 0 0 auto;
+        flex: 0 0 96px;
+        width: 96px;
+        min-width: 96px;
+        max-width: 96px;
         align-self: stretch;
         min-height: 0;
+        overflow-x: hidden;
         overflow-y: auto;
-        border-right: 1px solid #f0f0f0;
-        background: #fafafa;
+        border-right: 1px solid #d9d9d9;
+        background: #fff;
+        margin: 0 !important;
+        padding: 4px 0 !important;
+        box-sizing: border-box;
+        position: relative;
+        z-index: 1;
+        float: none !important;
+    }
+    @media (max-width: 767px) {
+        #procuremen-layout .procuremen-layout.row {
+            flex-wrap: wrap;
+        }
+        .procuremen-sidebar {
+            flex: 0 0 100%;
+            width: 100% !important;
+            min-width: 0 !important;
+            max-width: 100% !important;
+            border-right: none;
+            border-bottom: 1px solid #d9d9d9;
+            max-height: 160px;
+        }
+        #procuremen-layout .procuremen-main {
+            flex: 1 1 100%;
+            width: 100% !important;
+        }
     }
-    /* 左侧年月栏:桌面固定约 92px,略宽于纯数字月份便于显示「2026年」 */
     .procuremen-sidebar .year-title {
         font-weight: 600;
-        padding: 8px 6px 4px;
+        padding: 8px 4px 4px;
         margin: 4px 0 2px;
         background: transparent;
         border-radius: 0;
@@ -75,8 +133,8 @@
     }
     .procuremen-sidebar .procuremen-ym-item {
         display: block;
-        padding: 7px 6px;
-        margin: 2px 4px;
+        padding: 7px 4px;
+        margin: 2px 6px;
         color: #595959;
         border-radius: 6px;
         text-decoration: none;
@@ -94,14 +152,34 @@
         font-weight: 500;
     }
     #procuremen-layout .procuremen-main .widget-body {
-        overflow-x: hidden;
-        overflow-y: hidden;
+        overflow: hidden;
         flex: 1 1 auto;
         min-height: 0;
         min-width: 0;
         display: flex;
         flex-direction: column;
     }
+    /* 工具栏必须在 overflow 裁切区之外,否则会被裁掉上半截 */
+    .procuremen-toolbar-host {
+        display: block !important;
+        flex: 0 0 auto !important;
+        flex-shrink: 0 !important;
+        height: auto !important;
+        min-height: 44px !important;
+        max-height: none !important;
+        padding: 8px 8px 8px 4px !important;
+        margin: 0 !important;
+        border: none !important;
+        border-bottom: 1px solid #f0f0f0 !important;
+        width: 100%;
+        box-sizing: border-box;
+        overflow: visible !important;
+        position: relative;
+        z-index: 40;
+        background: #fff;
+        visibility: visible !important;
+        opacity: 1 !important;
+    }
     #procuremen-layout .procuremen-toolbar-host,
     #procuremen-layout .procuremen-wff-tabs {
         flex-shrink: 0;
@@ -116,30 +194,48 @@
         visibility: hidden !important;
         pointer-events: none !important;
     }
-    /* JS 把 .fixed-table-toolbar 挪到此处:上一行按钮,下一行 tabs */
-    .procuremen-toolbar-host {
-        padding: 10px 12px 8px 0;
-        margin-bottom: 0;
-        border-bottom: 1px solid #f0f0f0;
-        width: 100%;
-        box-sizing: border-box;
-        overflow: visible;
-        position: relative;
-        z-index: 3;
+    /* 表格内若残留工具栏占位则隐藏(已挪到 host) */
+    #procuremen-layout .procuremen-table-area .bootstrap-table > .fixed-table-toolbar {
+        display: none !important;
+        height: 0 !important;
+        margin: 0 !important;
+        padding: 0 !important;
+        overflow: hidden !important;
+        border: 0 !important;
     }
+    /* 宿主内工具栏:完整可见 */
+    #procuremen-layout .procuremen-toolbar-host > .fixed-table-toolbar,
     .procuremen-toolbar-host .fixed-table-toolbar {
-        border: none;
-        margin: 0;
-        padding: 0;
-        display: flex;
+        border: none !important;
+        margin: 0 !important;
+        padding: 0 !important;
+        display: flex !important;
         align-items: center;
-        justify-content: flex-start;
-        flex-wrap: nowrap;
+        justify-content: flex-start !important;
+        flex-wrap: nowrap !important;
+        flex-direction: row !important;
         gap: 12px;
-        width: 100%;
+        width: 100% !important;
         box-sizing: border-box;
-        overflow: visible;
+        overflow: visible !important;
         min-height: 36px;
+        height: auto !important;
+        max-height: none !important;
+        background: #fff;
+        visibility: visible !important;
+        opacity: 1 !important;
+        position: relative;
+        z-index: 20;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .btn-group,
+    .procuremen-toolbar-host .fixed-table-toolbar .columns {
+        overflow: visible !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .dropdown-menu {
+        z-index: 2000;
+        max-height: min(70vh, 520px);
+        overflow-y: auto;
+        overflow-x: hidden;
     }
     .procuremen-toolbar-host .fixed-table-toolbar > .pull-left,
     .procuremen-toolbar-host .fixed-table-toolbar > .bars.pull-left,
@@ -147,49 +243,150 @@
         float: none !important;
         margin: 0 !important;
         flex: 0 0 auto;
+        max-width: 100%;
+        visibility: visible !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .toolbar,
+    .procuremen-toolbar-host .fixed-table-toolbar .bs-bars .toolbar {
+        display: inline-block !important;
+        visibility: visible !important;
+        margin: 0 !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .toolbar .btn:not(.hide):not(.procuremen-stage-hide):not(.btn-selected-tips),
+    .procuremen-toolbar-host .fixed-table-toolbar .btn:not(.hide):not(.procuremen-stage-hide):not(.btn-selected-tips) {
+        display: inline-block !important;
+        visibility: visible !important;
+        opacity: 1 !important;
+        font-size: 13px !important;
+        line-height: 1.4 !important;
+        height: auto !important;
+        min-height: 30px;
+        max-height: none !important;
+        padding: 5px 12px !important;
+        vertical-align: middle;
+        overflow: visible !important;
+    }
+    /* 跨页选择提示 / 非本阶段按钮:必须能隐藏 */
+    #procuremen-layout .btn-selected-tips,
+    .procuremen-toolbar-host .btn-selected-tips,
+    .procuremen-toolbar-host .fixed-table-toolbar .toolbar .btn.btn-selected-tips,
+    .procuremen-toolbar-host .fixed-table-toolbar .btn.btn-selected-tips,
+    .procuremen-toolbar-host .fixed-table-toolbar .toolbar .btn.hide,
+    .procuremen-toolbar-host .fixed-table-toolbar .btn.hide,
+    .procuremen-toolbar-host .fixed-table-toolbar .toolbar .btn.procuremen-stage-hide,
+    .procuremen-toolbar-host .fixed-table-toolbar .btn.procuremen-stage-hide,
+    #toolbar .btn.procuremen-stage-hide,
+    #toolbar .btn.hide {
+        display: none !important;
+        visibility: hidden !important;
+        pointer-events: none !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .toolbar .btn .fa {
+        font-size: 14px !important;
     }
     .procuremen-toolbar-host .fixed-table-toolbar > .pull-right,
     .procuremen-toolbar-host .fixed-table-toolbar > .columns.pull-right,
-    .procuremen-toolbar-host .fixed-table-toolbar > .columns.columns-right {
+    .procuremen-toolbar-host .fixed-table-toolbar > .columns.columns-right,
+    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap {
         float: none !important;
-        margin-left: auto !important;
-        flex: 0 0 auto;
-        display: flex;
-        align-items: center;
-        flex-wrap: nowrap;
-        gap: 8px;
-    }
-    .procuremen-toolbar-host .fixed-table-toolbar .search {
+        clear: none !important;
+        margin: 0 0 0 auto !important;
+        margin-right: 0 !important;
+        padding: 0 !important;
+        flex: 0 0 auto !important;
+        display: flex !important;
+        flex-direction: row !important;
+        flex-wrap: nowrap !important;
+        align-items: center !important;
+        gap: 6px !important;
+        visibility: visible !important;
+        width: auto !important;
+        max-width: none !important;
+        order: 9 !important;
+        white-space: nowrap !important;
+        line-height: normal !important;
+    }
+    /* 图二:右侧图标按钮紧凑方形,与左侧彩色操作按钮区分 */
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap > .btn,
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap > .btn-group > .btn,
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap .keep-open > .btn,
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap .export > .btn {
+        padding: 5px 10px !important;
+        min-width: 34px;
+        min-height: 30px !important;
+        line-height: 1.2 !important;
+        background: #fff !important;
+        border: 1px solid #d9d9d9 !important;
+        color: #595959 !important;
+        border-radius: 4px !important;
+        box-shadow: none !important;
         float: none !important;
-        margin: 0 !important;
+        flex: 0 0 auto !important;
     }
-    .procuremen-toolbar-host .fixed-table-toolbar .search .form-control {
-        min-width: 140px;
-        max-width: 220px;
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap > .btn-group,
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap .keep-open,
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap .export {
+        margin: 0 !important;
+        float: none !important;
+        display: inline-flex !important;
+        flex: 0 0 auto !important;
     }
-    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap {
-        margin-left: auto !important;
+    /* 搜索框:仅作为 wrap 内子项;勿盖掉 .procuremen-toolbar-search-wrap 的 flex */
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap > .search,
+    .procuremen-toolbar-host .fixed-table-toolbar > .search:not(.procuremen-toolbar-search-wrap) {
         float: none !important;
-        display: flex !important;
-        align-items: center;
-        flex-wrap: nowrap;
-        gap: 8px;
+        clear: none !important;
+        margin: 0 !important;
+        padding: 0 !important;
+        display: inline-block !important;
+        visibility: visible !important;
+        width: auto !important;
+        max-width: none !important;
         flex: 0 0 auto !important;
-        flex-shrink: 0 !important;
-        min-width: min-content;
+        line-height: normal !important;
+        position: static !important;
+        order: 0 !important;
     }
-    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap .btn-group,
-    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap button[name="search"] {
-        flex-shrink: 0;
+    /* 兜底:万一 wrap 落在 .search 上,仍强制单行 flex */
+    .procuremen-toolbar-host .fixed-table-toolbar .search.procuremen-toolbar-search-wrap {
+        display: flex !important;
+        flex-direction: row !important;
+        flex-wrap: nowrap !important;
+        align-items: center !important;
+        margin-left: auto !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .search .form-control,
+    .procuremen-toolbar-host .procuremen-toolbar-search-wrap .search .form-control {
+        display: inline-block !important;
+        width: 160px !important;
+        min-width: 140px !important;
+        max-width: 180px !important;
+        height: 30px !important;
+        margin: 0 !important;
+        opacity: 1 !important;
+        border-radius: 4px !important;
+        border: 1px solid #d9d9d9 !important;
+        box-shadow: none !important;
+        vertical-align: middle;
     }
+    /* 顺序:搜索框(0) → 切换/列/导出(2) → 通用搜索放大镜(5) */
     .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > .search {
         order: 0 !important;
     }
-    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > *:not(.search) {
-        order: 2;
+    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > button[name="toggle"] {
+        order: 1 !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > .keep-open {
+        order: 2 !important;
     }
-    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > button[name="search"] {
-        order: 4 !important;
+    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > .export {
+        order: 3 !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > button[name="commonSearch"] {
+        order: 5 !important;
+    }
+    .procuremen-toolbar-host .fixed-table-toolbar .procuremen-toolbar-search-wrap > *:not(.search):not([name="toggle"]):not(.keep-open):not(.export):not([name="commonSearch"]) {
+        order: 4;
     }
     #procuremen-layout .procuremen-main .procuremen-table-area {
         flex: 1 1 auto;
@@ -199,11 +396,13 @@
         display: flex;
         flex-direction: column;
     }
+    /* 表格高度由 JS 控制,勿再 flex 压缩,避免连带裁切 */
     #procuremen-layout .procuremen-table-area > .bootstrap-table {
-        flex: 1 1 auto;
+        flex: 0 0 auto;
         min-height: 0;
         min-width: 0;
         width: 100%;
+        overflow: visible !important;
     }
     #procuremen-layout .bootstrap-table .fixed-table-container {
         width: 100% !important;
@@ -233,11 +432,23 @@
         border: none !important;
         border-bottom: 2px solid #1677ff !important;
     }
-    #procuremen-layout .bootstrap-table .table > thead > tr > th,
+    /* 表头:padding 只写在 .th-inner;th 自身 padding:0,避免色条与文字分离 */
+    #procuremen-layout .bootstrap-table .table > thead > tr > th {
+        padding: 0 !important;
+        line-height: 1.4;
+        vertical-align: middle;
+        height: auto !important;
+    }
+    #procuremen-layout .bootstrap-table .fixed-table-container thead th .th-inner {
+        padding: 8px 10px !important;
+        line-height: 1.4;
+        box-sizing: border-box;
+    }
     #procuremen-layout .bootstrap-table .table > tbody > tr > td {
-        padding: 3px 6px;
-        line-height: 1.28;
+        padding: 8px 10px;
+        line-height: 1.4;
         vertical-align: middle;
+        height: auto !important;
     }
     /* 复选框列:表头 .th-inner 与表体 td 内边距一致,避免全选与行勾选框错位 */
     #procuremen-layout .bootstrap-table th.bs-checkbox,
@@ -245,18 +456,21 @@
         width: 42px !important;
         min-width: 42px !important;
         max-width: 42px !important;
-        padding: 3px 4px !important;
+        padding: 0 !important;
         text-align: center !important;
         vertical-align: middle !important;
         box-sizing: border-box;
     }
     #procuremen-layout .bootstrap-table th.bs-checkbox .th-inner {
-        padding: 0 !important;
+        padding: 8px 4px !important;
         margin: 0 !important;
         text-align: center !important;
         line-height: 1;
         min-height: 0;
     }
+    #procuremen-layout .bootstrap-table td.bs-checkbox {
+        padding: 8px 4px !important;
+    }
     #procuremen-layout .bootstrap-table th.bs-checkbox input[type="checkbox"],
     #procuremen-layout .bootstrap-table td.bs-checkbox input[type="checkbox"] {
         margin: 0 auto !important;
@@ -273,17 +487,108 @@
         min-height: 28px;
         cursor: pointer;
     }
-    /* 表头与表体同步横向滚动,避免右侧列(如提交日期)被裁切 */
+    /* 表头与表体同步横向滚动;强制 table-layout:fixed,避免内容把表体列撑宽导致竖线错位 */
     #procuremen-layout .bootstrap-table .fixed-table-body {
         overflow: auto !important;
         -webkit-overflow-scrolling: touch;
         box-sizing: border-box;
     }
-    #procuremen-layout .bootstrap-table .fixed-table-body > table.table {
-        margin-right: 14px;
+    #procuremen-layout .bootstrap-table .fixed-table-header > table.table,
+    #procuremen-layout .bootstrap-table .fixed-table-body > table.table,
+    #procuremen-layout .bootstrap-table .fixed-columns-right table.table {
+        margin-right: 0 !important;
+        margin-left: 0 !important;
+        table-layout: fixed !important;
     }
     #procuremen-layout .bootstrap-table .fixed-table-header {
         overflow: hidden;
+        padding-right: 0 !important;
+        box-sizing: border-box;
+    }
+    #procuremen-layout .bootstrap-table .fixed-table-header,
+    #procuremen-layout .bootstrap-table .fixed-table-body {
+        box-sizing: border-box;
+    }
+    #procuremen-layout .bootstrap-table .fixed-table-header .fht-cell {
+        display: block !important;
+        height: 0 !important;
+        overflow: hidden !important;
+        box-sizing: border-box !important;
+    }
+    #procuremen-layout .bootstrap-table .table > thead > tr > th,
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td {
+        box-sizing: border-box;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        vertical-align: middle;
+        line-height: 1.4;
+    }
+    /* 表头:浅灰底、无竖线,仅底部分隔线(padding 见上方 .th-inner) */
+    #procuremen-layout .bootstrap-table .table > thead > tr > th,
+    #procuremen-layout .bootstrap-table .fixed-table-header .table > thead > tr > th,
+    #procuremen-layout .bootstrap-table .fixed-columns-right .table > thead > tr > th {
+        background: #f5f7fa !important;
+        color: #303133 !important;
+        font-weight: 600 !important;
+        border: none !important;
+        border-bottom: 1px solid #e4e7ed !important;
+        padding: 0 !important;
+    }
+    /* 表体:白底、无竖线,仅横线 */
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td,
+    #procuremen-layout .bootstrap-table .fixed-columns-right .table > tbody > tr > td {
+        background: #fff !important;
+        border: none !important;
+        border-bottom: 1px solid #ebeef5 !important;
+        color: #606266;
+    }
+    #procuremen-layout .bootstrap-table .table,
+    #procuremen-layout .bootstrap-table .table-bordered {
+        border: none !important;
+    }
+    /* 长文本列:不省略,允许换行完整显示 */
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td.procuremen-cell-wrap,
+    #procuremen-layout .bootstrap-table .table > thead > tr > th.procuremen-cell-wrap,
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="CYJMC"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="CCLBMMC"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="CGYMC"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="CDF"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="cGzzxMc"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="MBZ"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="notify_supplier_text"],
+    #procuremen-layout .bootstrap-table .table > tbody > tr > td[data-field="picked_supplier_name"] {
+        white-space: normal !important;
+        word-break: break-all !important;
+        overflow: visible !important;
+        text-overflow: clip !important;
+        line-height: 1.4 !important;
+        vertical-align: middle !important;
+    }
+    /* 操作列按钮不可省略裁切 */
+    #procuremen-layout .bootstrap-table thead th[data-field="operate"],
+    #procuremen-layout .bootstrap-table tbody td[data-field="operate"],
+    #procuremen-layout .bootstrap-table .fixed-columns-right td[data-field="operate"],
+    #procuremen-layout .bootstrap-table .fixed-columns-right th[data-field="operate"] {
+        overflow: visible !important;
+        text-overflow: clip !important;
+        white-space: nowrap !important;
+    }
+    /* 固定右列:外层定宽即可,内部必须是整表 + scrollLeft 到最右,禁止压成 240 宽的单列表 */
+    #procuremen-layout .bootstrap-table .fixed-columns-right {
+        min-width: 240px;
+        overflow: hidden !important;
+        background: #fff;
+    }
+    #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-header,
+    #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body {
+        overflow-x: hidden !important;
+    }
+    #procuremen-layout .bootstrap-table .fixed-columns-right table {
+        /* 勿强制 width:240,否则只能看到左侧复选框/订单号 */
+        width: auto !important;
+        min-width: 100% !important;
+        max-width: none !important;
     }
     /* 日期列加宽并禁止省略,避免滚到最右仍被竖向滚动条挡住 */
     #procuremen-layout .bootstrap-table thead th[data-field="dStamp"],
@@ -292,8 +597,9 @@
     #procuremen-layout .bootstrap-table tbody td[data-field="dputrecord"] {
         min-width: 176px !important;
         width: 176px !important;
+        max-width: 176px !important;
         white-space: nowrap;
-        overflow: visible;
+        overflow: hidden;
         text-overflow: clip;
     }
     #procuremen-layout .nice-validator .bootstrap-table td.bs-checkbox input[type="checkbox"],
@@ -318,6 +624,24 @@
         border-left: 1px solid #e3e6ea;
         background-color: #fff;
         z-index: 18 !important;
+        /* 盖住主表横向滚动条伸到操作列下方的那段,避免「操作按钮下面还能滑」 */
+        height: 100% !important;
+        bottom: 0 !important;
+    }
+    #procuremen-layout .bootstrap-table .fixed-columns-right::after {
+        content: '';
+        position: absolute;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        height: 17px;
+        background: #fff;
+        pointer-events: none;
+        z-index: 1;
+    }
+    #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-header,
+    #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body {
+        background: #fff;
     }
     #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-header table thead th,
     #procuremen-layout .bootstrap-table .fixed-columns-right .fixed-table-body table tbody td {
@@ -338,22 +662,23 @@
     #procuremen-layout .procuremen-op-btns .btn + .btn {
         margin-left: 6px;
     }
-    /* 可排序列表头:排序图标紧跟文字后面(th-inner 仅包裹文字宽度) */
+    /* 可排序列表头:去掉默认排序背景图,保留 .th-inner 内边距与文字对齐 */
     #procuremen-layout .bootstrap-table thead th.sortable,
     #procuremen-layout .bootstrap-table thead th .th-inner.sortable {
         background-image: none !important;
         background-position: unset !important;
-        padding-right: 6px !important;
     }
     #procuremen-layout .bootstrap-table thead th.sortable .th-inner,
     #procuremen-layout .bootstrap-table thead th .th-inner.sortable {
-        display: inline-block !important;
-        width: auto !important;
-        max-width: calc(100% - 2px);
-        padding-right: 0 !important;
+        display: block !important;
+        width: 100% !important;
+        max-width: 100%;
+        padding: 8px 10px !important;
         box-sizing: border-box;
         vertical-align: middle;
         white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
     }
     #procuremen-layout .bootstrap-table thead th.sortable .th-inner:after,
     #procuremen-layout .bootstrap-table thead th .th-inner.sortable:after {
@@ -549,7 +874,7 @@
 
     <div class="panel-body">
         <div class="row procuremen-layout">
-            <div class="col-xs-12 col-sm-2 col-md-1 procuremen-sidebar">
+            <div class="procuremen-sidebar">
                 {foreach name="sidebarYearMonths" item="block"}
                 <div class="procuremen-year-block">
                     <div class="year-title">{$block.year}年</div>
@@ -559,7 +884,7 @@
                 </div>
                 {/foreach}
             </div>
-            <div class="col-xs-12 col-sm-10 col-md-11 procuremen-main">
+            <div class="procuremen-main">
                 <div id="myTabContent" class="tab-content">
                     <div class="tab-pane fade active in" id="one">
                         <div class="widget-body no-padding">
@@ -568,20 +893,20 @@
                                 <div id="toolbar" class="toolbar">
                                     <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" >刷新 <i class="fa fa-refresh"></i> </a>
                                     {if isset($procuremenBtnAuditAbandon) && $procuremenBtnAuditAbandon}
-                                    <a href="javascript:;" class="btn btn-danger" id="btn-procuremen-audit-abandon" title="勾选一条或多条订单退回协助初选重新下发(历史记录保留)" style="display:none;"><i class="fa fa-repeat"></i> 重新下发</a>
+                                    <a href="javascript:;" class="btn btn-danger procuremen-stage-hide hide" id="btn-procuremen-audit-abandon" title="勾选一条或多条订单退回协助初选重新下发(历史记录保留)"><i class="fa fa-repeat"></i> 重新下发</a>
                                     {/if}
                                     {if isset($procuremenBtnDispatch) && $procuremenBtnDispatch}
-                                    <a href="javascript:;" class="btn btn-info" id="btn-procuremen-pick-review" title="勾选一条或多条工序进行下发(多条须同一订单号)" style="display:none;"><i class="fa fa-paper-plane"></i> 下发</a>
+                                    <a href="javascript:;" class="btn btn-info procuremen-stage-hide hide" id="btn-procuremen-pick-review" title="勾选一条或多条工序进行下发(多条须同一订单号)"><i class="fa fa-paper-plane"></i> 下发</a>
                                     {/if}
                                     {if isset($procuremenBtnComplete) && $procuremenBtnComplete}
-                                    <a href="javascript:;" class="btn btn-success" id="btn-procuremen-batch-finish" title="勾选一条或多条工序标记为已完结" style="display:none;"><i class="fa fa-flag-checkered"></i> 完结</a>
+                                    <a href="javascript:;" class="btn btn-success procuremen-stage-hide hide" id="btn-procuremen-batch-finish" title="勾选一条或多条工序标记为已完结"><i class="fa fa-flag-checkered"></i> 完结</a>
                                     {/if}
                                     {if isset($procuremenBtnPickDelete) && $procuremenBtnPickDelete}
-                                    <a href="javascript:;" class="btn btn-danger" id="btn-procuremen-pick-delete" title="勾选一条或多条工序从初选列表移除" style="display:none;"><i class="fa fa-trash"></i> 删除</a>
+                                    <a href="javascript:;" class="btn btn-danger procuremen-stage-hide hide" id="btn-procuremen-pick-delete" title="勾选一条或多条工序从初选列表移除"><i class="fa fa-trash"></i> 删除</a>
                                     {/if}
                                 </div>
                                 <table id="table"
-                                       class="table table-striped table-bordered table-hover">
+                                       class="table table-bordered table-hover">
                                 </table>
                             </div>
                         </div>

+ 1 - 1
application/admin/view/procuremenarchive/index.html

@@ -9,7 +9,7 @@
                 <a href="javascript:;" class="btn btn-danger" id="btn-archive-abandon" title="勾选一条或多条已完结订单退回协助初选重新下发"><i class="fa fa-repeat"></i> 重新下发</a>
                 {/if}
             </div>
-            <table id="table" class="table table-striped table-bordered table-hover table-nowrap" width="100%"></table>
+            <table id="table" class="table table-bordered table-hover table-nowrap" width="100%"></table>
         </div>
     </div>
 </div>

+ 1 - 1
application/admin/view/purchasecontent/index.html

@@ -16,7 +16,7 @@
     <div class="panel-body purchase-content-page">
         <div class="widget-body no-padding">
             <div id="toolbar" class="toolbar">
-                <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i></a>
+                <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}"><i class="fa fa-refresh"></i> 刷新</a>
                 <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('purchasecontent/add')?'':'hide'}" title="新增公告" data-area='["920px","720px"]'><i class="fa fa-plus"></i> 新增公告</a>
                 <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('purchasecontent/del')?'':'hide'}" title="删除"><i class="fa fa-trash"></i> 删除</a>
             </div>

+ 16 - 12
application/extra/mproc.php

@@ -24,18 +24,22 @@ return [
     'mock_sms_code' => '',
     // 开标双重验证:可选验证人所属角色组根 id(含全部子组)
     'bid_open_auth_group_root_id' => 10,
-    // 登录入口与角色组(页面标题对应哪个系统,就只允许该组账号)
-    // index/login          → 生产协同系统 → 根组 10
-    // index/cockpitlogin   → 生产经营驾驶舱 → 根组 2(及子组;如 xinhua=组3)
+
+    // 当前 login.html 对应哪个系统(换登录页同步改这里)
+    // collab = 生产协同;
+    // cockpit = 生产经营驾驶舱
+    'login_page_system' => 'collab',
+
+    //生产协同系统配置
+    // 角色组根 id(及其子组可登录);style:1=白色 2=黑色原版;brand=登录后侧栏名
     'collab_login_group_root_id' => 10,
+    'collab_system_style'        => 1,
+    'collab_system_brand'        => '生产协同系统',
+    'collab_allow_rule_super'    => true, // 超管 admin(rules=*)可登录
+
+    //生产经营驾驶舱系统配置
     'cockpit_login_group_root_ids' => [2],
-    // 驾驶舱是否允许规则为 * 的超管账号
-    'cockpit_allow_rule_super' => true,
-    // 系统风格:数字 1=白色 2=黑色原版侧栏
-    'collab_system_style'  => 1, // 生产协同
-    'cockpit_system_style' => 2, // 生产经营驾驶舱系统
-    // 左侧栏名
-    'collab_system_brand'  => '生产协同系统',
-    'cockpit_system_brand' => '浙江印刷集团有限公司',
+    'cockpit_system_style'         => 2,
+    'cockpit_system_brand'         => '浙江印刷集团有限公司',
+    'cockpit_allow_rule_super'     => true, // 超管 admin(rules=*)可登录
 ];
-

+ 1 - 1
application/extra/site.php

@@ -5,7 +5,7 @@ return array (
   'brand_logo' => 'https://a-7in6-com.oss-cn-hangzhou.aliyuncs.com/xinhua/img/logo1.png',
   'beian' => '',
   'cdnurl' => '',
-  'version' => '1.4.5',
+  'version' => '1.8.2',
   'timezone' => 'Asia/Shanghai',
   'forbiddenip' => '',
   'languages' => 

+ 9 - 18
application/extra/systems.php

@@ -1,29 +1,20 @@
 <?php
 
 /**
- * 双系统登录隔离(按角色组根节点
+ * 双系统默认项(分组根等以 mproc.php 为准,改 mproc 即可
  *
- * 入口与页面一一对应:
- * collab  = 生产协同系统         → index/login          → login.html
- * cockpit = 生产经营驾驶舱系统   → index/cockpitlogin   → 生产经营驾驶舱系统.html
- *
- * allowed_group_roots:用户属于「该根组或其任意子组」才可登录该入口。
- * allow_rule_super:是否允许后台规则为 * 的超管(通常仅驾驶舱)。
- *
- * 注意:不要把驾驶舱根配成 1,否则生产协同账号也会被放行。
- * 后台风格见 mproc.collab_system_style / cockpit_system_style(1白 / 2黑)。
+ * 统一登录页:index/login → login.html
+ * 密码通过后按角色组识别 collab / cockpit,再套用对应风格与侧栏名。
  */
 return [
     'collab' => [
-        'name'                => '生产协同系统',
-        'brand'               => '生产协同系统',
-        'allowed_group_roots' => [10],
-        'allow_rule_super'    => false,
+        'name'             => '生产协同系统',
+        'brand'            => '生产协同系统',
+        'allow_rule_super' => true,
     ],
     'cockpit' => [
-        'name'                => '生产经营驾驶舱系统',
-        'brand'               => '浙江印刷集团有限公司',
-        'allowed_group_roots' => [2],
-        'allow_rule_super'    => true,
+        'name'             => '生产经营驾驶舱系统',
+        'brand'            => '浙江印刷集团有限公司',
+        'allow_rule_super' => true,
     ],
 ];

+ 194 - 12
public/assets/css/xinhua-theme.css

@@ -51,6 +51,18 @@
     border-left: none !important;
 }
 
+/* 侧栏收起/展开瞬间完成,避免内容区宽度动画过程中表格列反复跳动 */
+.skin-blue-light .content-wrapper,
+.skin-blue-light .right-side,
+.skin-blue-light .main-footer,
+.skin-blue-light .main-sidebar,
+.skin-blue-light .left-side {
+    -webkit-transition: none !important;
+    -moz-transition: none !important;
+    -o-transition: none !important;
+    transition: none !important;
+}
+
 .skin-blue-light .sidebar .user-panel {
     border-bottom: 1px solid #f5f5f5;
     padding-bottom: 12px;
@@ -96,6 +108,32 @@
     background: transparent !important;
 }
 
+/* 侧栏收起后悬浮子菜单:必须实色底,否则表格内容会透出来 */
+@media (min-width: 768px) {
+    .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),
+    .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
+        background: #ffffff !important;
+    }
+    .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {
+        background: #ffffff !important;
+        border: 1px solid #f0f0f0 !important;
+        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1) !important;
+        z-index: 1100 !important;
+    }
+    .skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right) {
+        border: 1px solid #f0f0f0 !important;
+        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
+        color: #1f1f1f !important;
+    }
+    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu,
+    .skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {
+        background: #222d32 !important;
+        border: 1px solid #1a2226 !important;
+        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
+        z-index: 1100 !important;
+    }
+}
+
 .skin-blue-light .sidebar-form {
     border: 1px solid #f0f0f0 !important;
     border-radius: 6px !important;
@@ -244,8 +282,61 @@ body.inside-header.inside-aside #content {
     box-shadow: none !important;
 }
 
-.content-wrapper .content {
-    padding: 12px 16px;
+/* iframe 内容区保留少量左右内边距,避免贴边裁切工具栏/侧栏 */
+.content-wrapper .content,
+body.inside-aside .content,
+#content .content {
+    padding: 8px 10px !important;
+}
+
+/* 导航与内容仅竖线分隔;勿清 content-wrapper 的 margin-left(侧栏占位依赖它) */
+.skin-blue-light .main-sidebar {
+    border-right: 1px solid #e8e8e8 !important;
+}
+.skin-blue-light .content-wrapper {
+    border-left: none !important;
+}
+/* 只清 iframe / 页签内容的边距,绝不能清 .content-wrapper 自身的 margin-left */
+.skin-blue-light .content-wrapper > .tab-pane,
+.skin-blue-light .content-wrapper.tab-addtabs > .tab-pane,
+.skin-blue-light .content-wrapper iframe,
+.skin-blue-light .content-wrapper.tab-addtabs iframe {
+    margin: 0 !important;
+    padding: 0 !important;
+    border: 0 !important;
+}
+
+/* 明确恢复 AdminLTE 侧栏占位,避免内容整体贴到左侧被侧栏挡住 */
+@media (min-width: 768px) {
+    .skin-blue-light:not(.sidebar-collapse) .content-wrapper,
+    .skin-blue-light:not(.sidebar-collapse) .right-side,
+    .skin-blue-light:not(.sidebar-collapse) .main-footer {
+        margin-left: 230px !important;
+    }
+    .skin-blue-light:not(.sidebar-collapse) .main-header .navbar {
+        margin-left: 230px !important;
+    }
+    .skin-blue-light.sidebar-mini.sidebar-collapse .content-wrapper,
+    .skin-blue-light.sidebar-mini.sidebar-collapse .right-side,
+    .skin-blue-light.sidebar-mini.sidebar-collapse .main-footer {
+        margin-left: 50px !important;
+    }
+    .skin-blue-light.sidebar-mini.sidebar-collapse .main-header .navbar {
+        margin-left: 50px !important;
+    }
+    .skin-blue-light.sidebar-mini.sidebar-collapse .main-header .logo {
+        width: 50px !important;
+    }
+    /* 侧栏收起时不显示左上角品牌短名(如「生产」) */
+    .sidebar-mini.sidebar-collapse .main-header .logo .logo-mini,
+    .sidebar-mini.sidebar-collapse .main-header .logo .logo-lg {
+        display: none !important;
+        visibility: hidden !important;
+        width: 0 !important;
+        height: 0 !important;
+        overflow: hidden !important;
+        opacity: 0 !important;
+    }
 }
 
 /* 表格区域 */
@@ -257,32 +348,123 @@ body.inside-header.inside-aside #content {
     border-radius: 6px !important;
 }
 
+/* 列显隐下拉:勾选框与文字贴紧(去掉文字前多余空隙) */
+.bootstrap-table .fixed-table-toolbar .dropdown-menu > li > label,
+.procuremen-toolbar-host .dropdown-menu > li > label {
+    display: block;
+    padding: 4px 14px 4px 10px !important;
+    margin: 0 !important;
+    font-weight: 400;
+    white-space: nowrap;
+    cursor: pointer;
+    line-height: 1.4;
+}
+.bootstrap-table .fixed-table-toolbar .dropdown-menu > li > label input[type="checkbox"],
+.procuremen-toolbar-host .dropdown-menu > li > label input[type="checkbox"] {
+    margin: 0 4px 0 0 !important;
+    padding: 0 !important;
+    position: static !important;
+    float: none !important;
+    vertical-align: -2px;
+}
+
 .bootstrap-table .table,
 .table {
-    border-color: #f0f0f0 !important;
+    border: none !important;
+    border-color: transparent !important;
 }
 
+/* 参考样式:浅灰表头、仅横线分隔、无竖线
+ * 注意:bootstrap-table 表头 padding 只能加在 .th-inner 上,勿同时给 th 加 padding,否则表头色条与文字错位 */
 .bootstrap-table .table > thead > tr > th,
 .table > thead > tr > th {
-    background: #fafafa !important;
-    color: #434343 !important;
-    border-bottom: 1px solid #f0f0f0 !important;
-    font-weight: 500;
+    background: #f5f7fa !important;
+    color: #303133 !important;
+    border: none !important;
+    border-bottom: 1px solid #e4e7ed !important;
+    font-weight: 600;
     font-size: 13px;
 }
+.bootstrap-table .fixed-table-container thead th,
+.bootstrap-table .table > thead > tr > th {
+    padding: 0 !important;
+}
+.bootstrap-table .fixed-table-container thead th .th-inner,
+.bootstrap-table .fixed-table-container thead th .th-inner.sortable,
+.bootstrap-table .fixed-table-container thead th .sortable {
+    padding: 8px 10px !important;
+    line-height: 1.4;
+    background-image: none;
+}
 
-.bootstrap-table .table > tbody > tr > td {
-    border-color: #f5f5f5 !important;
-    color: #434343;
+.bootstrap-table .table > tbody > tr > td,
+.table > tbody > tr > td {
+    border: none !important;
+    border-bottom: 1px solid #ebeef5 !important;
+    border-left: none !important;
+    border-right: none !important;
+    border-top: none !important;
+    color: #606266;
     font-size: 13px;
+    background-color: #ffffff !important;
+    padding: 8px 10px !important;
+}
+/* 覆盖 backend.css 固定 47px 行高,避免换行单元格/表头被裁切 */
+.bootstrap-table .table:not(.table-condensed) > tbody > tr > td,
+.bootstrap-table .table:not(.table-condensed) > thead > tr > th {
+    height: auto !important;
+}
+
+.bootstrap-table .table-bordered,
+.table-bordered {
+    border: none !important;
+}
+.bootstrap-table .table-bordered > thead > tr > th,
+.bootstrap-table .table-bordered > tbody > tr > td,
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > td {
+    border-left: none !important;
+    border-right: none !important;
+}
+
+/* 取消斑马纹:全部白底 */
+.table-striped > tbody > tr:nth-of-type(odd),
+.table-striped > tbody > tr:nth-of-type(even),
+.table-striped > tbody > tr:nth-of-type(odd) > td,
+.table-striped > tbody > tr:nth-of-type(even) > td,
+.bootstrap-table .table-striped > tbody > tr:nth-of-type(odd) > td,
+.bootstrap-table .table-striped > tbody > tr:nth-of-type(even) > td {
+    background-color: #ffffff !important;
 }
 
-.bootstrap-table .table > tbody > tr:hover > td {
+.bootstrap-table .table > tbody > tr:hover > td,
+.table-striped > tbody > tr:hover > td {
     background: #fafafa !important;
 }
 
+/* FastAdmin autocontent 默认 max-width:250px,列变宽后仍提前省略;改为占满单元格 */
+.bootstrap-table td.autocontent {
+    vertical-align: middle !important;
+}
+.bootstrap-table td.autocontent > .autocontent-item {
+    max-width: 100% !important;
+    width: 100% !important;
+    box-sizing: border-box !important;
+    display: block;
+    margin: 0 !important;
+    padding: 0 !important;
+}
+
+/* 无数据占位:文案垂直居中铺满表体 */
+.bootstrap-table .fixed-table-body tr.no-records-found > td {
+    color: #8c8c8c !important;
+    font-size: 14px !important;
+    vertical-align: middle !important;
+    text-align: center !important;
+}
+
 .fixed-table-pagination {
-    border-top: 1px solid #f0f0f0 !important;
+    border-top: 1px solid #d9d9d9 !important;
     background: #ffffff !important;
 }
 

+ 34 - 0
public/assets/js/backend.js

@@ -245,6 +245,40 @@ define(['fast', 'template', 'moment'], function (Fast, Template, Moment) {
                 $('body').tooltip({selector: '[data-toggle="tooltip"]', trigger: 'hover'});
             }
             $('body').popover({selector: '[data-toggle="popover"]'});
+
+            // 侧栏收起/展开结束后,统一重算 bootstrap-table,避免表头表体列宽锁死导致跳动
+            var sidebarTableTimer = null;
+            var relayoutBootstrapTables = function () {
+                if (typeof $.fn.bootstrapTable === 'undefined') {
+                    return;
+                }
+                $('table').each(function () {
+                    var $table = $(this);
+                    if (!$table.data('bootstrap.table')) {
+                        return;
+                    }
+                    try {
+                        $table.closest('.bootstrap-table')
+                            .find('.fixed-table-header thead th, .fixed-table-body col, .fixed-table-header col')
+                            .css({width: '', minWidth: '', maxWidth: ''});
+                        $table.bootstrapTable('resetView');
+                    } catch (ignore) {
+                    }
+                });
+                $(document).trigger('fa.table.relayout');
+            };
+            $(document).on('fa.sidebar.resized', function () {
+                $('body').removeClass('fa-sidebar-resizing');
+                if (sidebarTableTimer) {
+                    clearTimeout(sidebarTableTimer);
+                }
+                sidebarTableTimer = setTimeout(relayoutBootstrapTables, 40);
+            });
+            $(window).on('resize.faSidebarTable', function () {
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
+                }
+            });
         }
     };
     Backend.api = $.extend(Fast.api, Backend.api);

+ 25 - 2
public/assets/js/backend/index.js

@@ -331,12 +331,35 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
                 $.AdminLTE.layout.fixSidebar();
             });
 
-            // 切换菜单栏
+            // 切换菜单栏:通知各 tab iframe 在布局稳定后再重算表格,避免收起/展开时列宽乱动
             $(document).on("click", ".sidebar-toggle", function () {
                 var value = $("body").hasClass("sidebar-collapse") ? 1 : 0;
+                var $iframes = $(".content-wrapper iframe, .tab-addtabs iframe");
+                $iframes.each(function () {
+                    try {
+                        var w = this.contentWindow;
+                        if (w && w.jQuery) {
+                            w.jQuery(w.document.body).addClass('fa-sidebar-resizing');
+                        }
+                    } catch (ignore) {
+                    }
+                });
                 setTimeout(function () {
                     $(window).trigger("resize");
-                }, 300);
+                    $iframes.each(function () {
+                        try {
+                            var w = this.contentWindow;
+                            if (!w || !w.jQuery) {
+                                return;
+                            }
+                            var $jq = w.jQuery;
+                            $jq(w.document.body).removeClass('fa-sidebar-resizing');
+                            $jq(w.document).trigger('fa.sidebar.resized');
+                            $jq(w).trigger('resize');
+                        } catch (ignore) {
+                        }
+                    });
+                }, 80);
                 createCookie('sidebar_collapse', value);
             });
 

+ 461 - 41
public/assets/js/backend/procuremen.js

@@ -439,10 +439,30 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 table.bootstrapTable((stagePick || stageAudit) ? 'showColumn' : 'hideColumn', 'state');
             } catch (ignore) {
             }
-            $('#btn-procuremen-pick-review').toggle(stagePick && procuremenCanDispatch());
-            $('#btn-procuremen-pick-delete').toggle(stagePick && procuremenCanPickDelete());
-            $('#btn-procuremen-batch-finish').toggle(stagePick && procuremenCanComplete());
-            $('#btn-procuremen-audit-abandon').toggle(stageAudit && procuremenCanAuditAbandon());
+            // 用 class 显隐,避免被工具栏 CSS 的 display:!important 盖掉
+            function procuremenToggleStageBtn(sel, show) {
+                var $btn = $(sel);
+                if (!$btn.length) {
+                    return;
+                }
+                $btn.toggleClass('procuremen-stage-hide', !show);
+                $btn.toggleClass('hide', !show);
+                if (show) {
+                    $btn.css('display', '');
+                } else {
+                    $btn.css('display', 'none');
+                }
+            }
+            function procuremenApplyStageButtons() {
+                var pick = Controller.wffTab === 'pick';
+                var audit = Controller.wffTab === 'audit';
+                procuremenToggleStageBtn('#btn-procuremen-pick-review', pick && procuremenCanDispatch());
+                procuremenToggleStageBtn('#btn-procuremen-pick-delete', pick && procuremenCanPickDelete());
+                procuremenToggleStageBtn('#btn-procuremen-batch-finish', pick && procuremenCanComplete());
+                procuremenToggleStageBtn('#btn-procuremen-audit-abandon', audit && procuremenCanAuditAbandon());
+            }
+            procuremenApplyStageButtons();
+            Controller._procuremenApplyStageButtons = procuremenApplyStageButtons;
 
             $(document).off('click.procuremenYm', '.procuremen-ym-item').on('click.procuremenYm', '.procuremen-ym-item', function () {
                 var ym = $(this).data('ym');
@@ -466,46 +486,105 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 if (!$host.length || !$bt.length) {
                     return;
                 }
-                var $ft = $bt.children('.fixed-table-toolbar').first();
-                if (!$ft.length) {
-                    $ft = $host.find('.fixed-table-toolbar').first();
-                }
-                if (!$ft.length) {
+                $host.show().css({
+                    display: 'block',
+                    height: '',
+                    minHeight: '',
+                    padding: '',
+                    border: '',
+                    overflow: 'visible'
+                });
+
+                var $hostFt = $host.children('.fixed-table-toolbar').first();
+                var $btFt = $bt.children('.fixed-table-toolbar').first();
+
+                // 宿主已有完整工具栏:保留,隐藏表格内重复生成的空壳
+                var hostOk = $hostFt.length && $hostFt.find('.btn-refresh, .toolbar .btn, .bs-bars .btn').length > 0;
+                if (hostOk) {
+                    if ($btFt.length) {
+                        $btFt.hide().attr('data-procuremen-toolbar-dup', '1');
+                    }
+                    // 每次都校正右侧顺序,保证贴右且图标顺序与图二一致
+                    procuremenNormalizeToolbarRight($hostFt);
+                    procuremenBindToolbarDropdownFix();
+                    if (typeof Controller._procuremenApplyStageButtons === 'function') {
+                        Controller._procuremenApplyStageButtons();
+                    }
                     return;
                 }
-                if ($ft.parent()[0] === $host[0] && $ft.find('.procuremen-toolbar-search-wrap').length) {
+
+                // 把表格内工具栏挪到宿主(脱离 overflow:hidden,避免上半截被裁切)
+                var $ft = $btFt.length ? $btFt : $hostFt;
+                if (!$ft.length) {
                     return;
                 }
                 if ($ft.parent()[0] !== $host[0]) {
-                    $host.children('.fixed-table-toolbar').remove();
-                    $host.append($ft);
+                    $host.children('.fixed-table-toolbar').each(function () {
+                        var $old = $(this);
+                        if (!$old.find('.btn-refresh, .toolbar .btn, .search').length) {
+                            $old.remove();
+                        }
+                    });
+                    $host.append($ft.show().removeAttr('data-procuremen-toolbar-dup'));
                     var $src = $bt.closest('.procuremen-table-area').find('#toolbar').first();
                     if ($src.length && !$src.children().length) {
                         $src.addClass('procuremen-toolbar-empty');
                     }
                 }
-                $ft.find('.procuremen-toolbar-search-wrap').removeClass('procuremen-toolbar-search-wrap');
+                procuremenNormalizeToolbarRight($ft);
+                procuremenBindToolbarDropdownFix();
+                if (typeof Controller._procuremenApplyStageButtons === 'function') {
+                    Controller._procuremenApplyStageButtons();
+                }
+                // 工具栏移出后重算表高,避免占位错乱
+                setTimeout(function () {
+                    procuremenTableHeightCached = 0;
+                    procuremenSyncTableHeight();
+                    if (typeof Controller._procuremenApplyStageButtons === 'function') {
+                        Controller._procuremenApplyStageButtons();
+                    }
+                }, 0);
+            }
+
+            function procuremenNormalizeToolbarRight($ft) {
+                if (!$ft || !$ft.length) {
+                    return;
+                }
                 var $search = $ft.find('.search').first();
                 if (!$search.length) {
                     return;
                 }
-                var $right = $search.closest('.columns, .pull-right').first();
-                if (!$right.length || ($ft[0] && !$.contains($ft[0], $right[0]))) {
-                    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]) {
+                    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);
-                    if (!mergeToolbarExtras || $c.find('.search').length) {
+                        || ($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) {
@@ -513,12 +592,83 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         }
                     }
                 });
-                $ft.find('.search').first().prependTo($right);
+                // 顺序:搜索框 → 切换 → 列显隐 → 导出 → 通用搜索(放大镜)
                 $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');
+                if (!$host.length || $host.data('dropdownFixBound')) {
+                    return;
+                }
+                $host.data('dropdownFixBound', 1);
+                $host.on('show.bs.dropdown shown.bs.dropdown', '.btn-group', function () {
+                    var $btnGroup = $(this);
+                    var $menu = $btnGroup.children('.dropdown-menu').first();
+                    if (!$menu.length) {
+                        return;
+                    }
+                    var place = function () {
+                        var btnTop = $btnGroup.offset().top;
+                        var btnHeight = $btnGroup.outerHeight();
+                        var scrollTop = $(window).scrollTop();
+                        var winH = $(window).height();
+                        var menuH = $menu.outerHeight() || 280;
+                        var maxH = Math.max(220, Math.min(520, winH - 24));
+                        var top = btnTop - scrollTop + btnHeight;
+                        if (top + Math.min(menuH, maxH) > winH - 8) {
+                            var up = btnTop - scrollTop - Math.min(menuH, maxH) - 4;
+                            if (up >= 8) {
+                                top = up;
+                                maxH = Math.min(maxH, Math.max(180, btnTop - scrollTop - 12));
+                            } else {
+                                maxH = Math.max(180, winH - top - 12);
+                            }
+                        }
+                        var left = $btnGroup.offset().left + $btnGroup.outerWidth() - ($menu.outerWidth() || 180);
+                        left = Math.max(8, Math.min(left, $(window).width() - ($menu.outerWidth() || 180) - 8));
+                        $menu.css({
+                            position: 'fixed',
+                            top: top,
+                            left: left,
+                            right: 'auto',
+                            bottom: 'auto',
+                            maxHeight: maxH + 'px',
+                            overflowY: 'auto',
+                            overflowX: 'hidden',
+                            zIndex: 2000
+                        });
+                    };
+                    place();
+                    setTimeout(place, 0);
+                });
             }
 
             table.on('post-header.bs.table', function () {
                 procuremenPlaceToolbar();
+                procuremenScheduleAlign();
             });
 
             var indexInitWffTab = Controller.wffTab;
@@ -632,15 +782,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 //     }
                 // },
                 {field: 'CCYDH', title: __('订单号'), operate: 'LIKE', table: 'b', width: 108, align: 'center', sortable: true, class: 'procuremen-th-sort-tight'},
-                {field: 'CYJMC', title: __('印件名称'), operate: 'LIKE', table: 'b', width: 270, align: 'left'},
-                {field: 'CCLBMMC', title: '承揽部门', operate: 'LIKE', table: 'b', width: 100, align: 'center'},
-                {field: 'CGYMC', title: __('工序名称'), operate: 'LIKE', table: 'a', width: 140, align: 'left',
+                {field: 'CYJMC', title: __('印件名称'), operate: 'LIKE', table: 'b', width: 270, align: 'left', class: 'procuremen-cell-wrap',
+                    formatter: function (v) {
+                        if (v == null || v === '') {
+                            return '';
+                        }
+                        return '<span title="' + procuremenEscAttr(v) + '">' + procuremenEscHtml(v) + '</span>';
+                    }
+                },
+                {field: 'CCLBMMC', title: '承揽部门', operate: 'LIKE', table: 'b', width: 140, align: 'center', class: 'procuremen-cell-wrap'},
+                {field: 'CGYMC', title: __('工序名称'), operate: 'LIKE', table: 'a', width: 140, align: 'left', class: 'procuremen-cell-wrap',
                     formatter: function (v) {
                         return v != null && v !== '' ? String(v) : '';
                     }
                 },
-                {field: 'CDW', title: __('单位'), operate: 'LIKE', table: 'a', width: 50, align: 'center'},
-                {field: 'NGZL', title: __('工作量'), operate: 'LIKE', table: 'a', width: 80, align: 'center',
+                {field: 'CDW', title: __('单位'), operate: 'LIKE', table: 'a', width: 88, align: 'center'},
+                {field: 'NGZL', title: __('工作量'), operate: 'LIKE', table: 'a', width: 88, align: 'center',
                     formatter: function (v) {
                         if (v == null || v === '') {
                             return '';
@@ -721,13 +878,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         return procuremenSupplierCntText(v);
                     }
                 },
-                {field: 'CDF', title: __('订法'), operate: 'LIKE', table: 'a', width: 100, align: 'center'},
-                {field: 'cGzzxMc', title: __('外厂单位'), operate: 'LIKE', table: 'a', width: 220, align: 'center'},
-                {field: 'MBZ', title: __('备注'), operate: 'LIKE', table: 'a', width: 150, align: 'center'},
+                {field: 'CDF', title: __('订法'), operate: 'LIKE', table: 'a', width: 100, align: 'center', class: 'procuremen-cell-wrap'},
+                {field: 'cGzzxMc', title: __('外厂单位'), operate: 'LIKE', table: 'a', width: 220, align: 'center', class: 'procuremen-cell-wrap'},
+                {field: 'MBZ', title: __('备注'), operate: 'LIKE', table: 'a', width: 150, align: 'center', class: 'procuremen-cell-wrap'},
                 {field: 'cywyxm', title: __('业务员'), operate: 'LIKE', table: 'b', width: 80, align: 'center'},
                 {field: 'dStamp', title: __('操作日期'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, table: 'a', width: 176, align: 'center', sortable: true, class: 'procuremen-th-sort-tight'},
                 {field: 'dputrecord', title: __('提交日期'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, table: 'b', width: 176, align: 'center', sortable: true, class: 'procuremen-th-sort-tight'},
-                {field: 'operate',title: '操作',width: 220,align: 'center',fixed: 'right', operate: false,
+                {field: 'operate',title: '操作',width: 240,align: 'center',fixed: 'right', operate: false,
                     visible: indexInitWffTab !== 'pick',
                     table: table,
                     formatter: function (value, row, index) {
@@ -785,16 +942,200 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     procuremenHeightSyncTimer = null;
                     var h = procuremenCalcTableHeight();
                     if (procuremenTableHeightCached > 0 && Math.abs(procuremenTableHeightCached - h) <= 3) {
+                        procuremenScheduleAlign();
                         return;
                     }
                     procuremenTableHeightCached = h;
                     try {
                         table.bootstrapTable('resetView', {height: h});
+                        procuremenScheduleAlign();
                     } catch (ignore) {
                     }
                 }, 100);
             }
 
+            /** 按列配置生成统一宽度,表头/表体共用,杜绝内容撑开导致竖线错位 */
+            function procuremenGetVisibleColWidths() {
+                var widths = [];
+                try {
+                    var opts = table.bootstrapTable('getOptions') || {};
+                    var cols = (opts.columns && opts.columns[0]) ? opts.columns[0] : indexTableColumns;
+                    $.each(cols, function (_, col) {
+                        if (!col || col.visible === false) {
+                            return;
+                        }
+                        var w = parseInt(col.width, 10);
+                        if (!w || isNaN(w)) {
+                            w = col.checkbox ? 42 : 120;
+                        }
+                        widths.push(w);
+                    });
+                } catch (ignore) {
+                }
+                return widths;
+            }
+
+            function procuremenApplyColgroup($tbl, widths) {
+                if (!$tbl || !$tbl.length || !widths.length) {
+                    return;
+                }
+                var total = 0;
+                var i;
+                for (i = 0; i < widths.length; i++) {
+                    total += widths[i];
+                }
+                $tbl.css({
+                    tableLayout: 'fixed',
+                    width: total + 'px',
+                    minWidth: total + 'px'
+                });
+                var $cg = $tbl.children('colgroup');
+                if (!$cg.length) {
+                    $cg = $('<colgroup/>').prependTo($tbl);
+                }
+                $cg.empty();
+                for (i = 0; i < widths.length; i++) {
+                    $cg.append($('<col/>').attr('style', 'width:' + widths[i] + 'px;min-width:' + widths[i] + 'px;'));
+                }
+                $tbl.find('thead tr:first > th').each(function (idx) {
+                    if (idx >= widths.length) {
+                        return;
+                    }
+                    var w = widths[idx];
+                    var $th = $(this);
+                    $th.css({width: w + 'px', minWidth: w + 'px', maxWidth: w + 'px'});
+                    $th.find('.fht-cell').css({width: w + 'px', minWidth: w + 'px', maxWidth: w + 'px'});
+                });
+                // 只锁首行即可带动 fixed 布局;避免给每一行都写 style 太重
+                $tbl.find('tbody tr:first-child:not(.no-records-found) > *').each(function (idx) {
+                    if (idx >= widths.length) {
+                        return;
+                    }
+                    var w = widths[idx];
+                    $(this).css({width: w + 'px', minWidth: w + 'px', maxWidth: w + 'px'});
+                });
+            }
+
+            /** 表头/表体列线对齐:统一 colgroup 宽度,不再用内容实测宽(内容会把表体撑偏) */
+            function procuremenSyncHeaderBodyAlign() {
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
+                }
+                var $bt = table.closest('.bootstrap-table');
+                if (!$bt.length) {
+                    return;
+                }
+                var $headerWrap = $bt.find('> .fixed-table-container > .fixed-table-header').first();
+                if (!$headerWrap.length) {
+                    $headerWrap = $bt.find('.fixed-table-header').not('.fixed-columns-right .fixed-table-header').first();
+                }
+                var $bodyWrap = $bt.find('> .fixed-table-container > .fixed-table-body').first();
+                if (!$bodyWrap.length) {
+                    $bodyWrap = $bt.find('.fixed-table-body').not('.fixed-columns-right .fixed-table-body, .fixed-columns .fixed-table-body').first();
+                }
+                if (!$headerWrap.length || !$bodyWrap.length) {
+                    return;
+                }
+                var $headerTable = $headerWrap.children('table').first();
+                var $bodyTable = $bodyWrap.children('table').first();
+                if (!$headerTable.length || !$bodyTable.length) {
+                    return;
+                }
+
+                var widths = procuremenGetVisibleColWidths();
+                if (!widths.length) {
+                    // 兜底:按当前表头列数均分不可靠,改为按现有 th 数量取配置默认
+                    var n = $headerTable.find('thead tr:first > th').length;
+                    for (var k = 0; k < n; k++) {
+                        widths.push(120);
+                    }
+                }
+
+                // 列数不一致时以较少者为准,避免错位
+                var headCount = $headerTable.find('thead tr:first > th').length;
+                var bodyCount = $bodyTable.find('tbody tr:first-child:not(.no-records-found) > *').length;
+                if (!bodyCount) {
+                    bodyCount = $bodyTable.find('thead tr:first > th').length;
+                }
+                var colCount = Math.min(widths.length, headCount || widths.length, bodyCount || widths.length);
+                if (colCount > 0 && colCount < widths.length) {
+                    widths = widths.slice(0, colCount);
+                }
+
+                $headerWrap.css('padding-right', '');
+                var bodyEl = $bodyWrap[0];
+                var sb = Math.max(0, bodyEl.offsetWidth - bodyEl.clientWidth);
+                $headerWrap.css('margin-right', sb > 0 ? sb + 'px' : '');
+
+                procuremenApplyColgroup($headerTable, widths);
+                procuremenApplyColgroup($bodyTable, widths);
+
+                // 主表横向滚动与表头同步;避免异常 scrollLeft 把左侧复选框/订单号滚出可视区
+                var sl = $bodyWrap.scrollLeft() || 0;
+                if (sl < 0) {
+                    sl = 0;
+                    $bodyWrap.scrollLeft(0);
+                }
+                $headerWrap.scrollLeft(sl);
+
+                // 右侧固定操作列:插件克隆整表再 scrollLeft 到最右;切勿 scrollLeft(0) 或把 table 压成 240px
+                var $fixedRight = $bt.find('.fixed-columns-right');
+                if ($fixedRight.length) {
+                    var $fh = $fixedRight.find('.fixed-table-header').first();
+                    var $fb = $fixedRight.find('.fixed-table-body').first();
+                    var $fTable = $fh.find('table').first();
+                    if (!$fTable.length) {
+                        $fTable = $fb.find('table').first();
+                    }
+                    // 清掉历史错误内联样式,恢复整表宽度
+                    $fixedRight.find('table').each(function () {
+                        $(this).css({width: '', minWidth: '', maxWidth: '', tableLayout: ''});
+                    });
+                    $fixedRight.find('thead th, tbody td').css({
+                        width: '',
+                        minWidth: '',
+                        maxWidth: '',
+                        overflow: '',
+                        whiteSpace: ''
+                    });
+                    $fixedRight.find('colgroup').remove();
+
+                    var opW = 240;
+                    var $opCell = $bt.find('.fixed-table-body table thead th[data-field="operate"]').first();
+                    if (!$opCell.length) {
+                        $opCell = $headerTable.find('th[data-field="operate"]').first();
+                    }
+                    if ($opCell.length) {
+                        var measured = $opCell.outerWidth();
+                        if (measured > 0) {
+                            opW = Math.max(measured, 240);
+                        }
+                    }
+                    $fixedRight.css({
+                        width: opW + 'px',
+                        minWidth: opW + 'px',
+                        maxWidth: opW + 'px',
+                        display: 'block',
+                        visibility: 'visible',
+                        overflow: 'hidden'
+                    });
+
+                    var fullW = $fTable.outerWidth() || $fTable.width() || 0;
+                    if (fullW > 0) {
+                        $fh.scrollLeft(fullW);
+                        $fb.scrollLeft(fullW);
+                    }
+                }
+            }
+
+            function procuremenScheduleAlign() {
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
+                }
+                setTimeout(procuremenSyncHeaderBodyAlign, 0);
+                setTimeout(procuremenSyncHeaderBodyAlign, 80);
+            }
+
             var procuremenInitTableHeight = procuremenCalcTableHeight();
 
             table.bootstrapTable({
@@ -809,9 +1150,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 clickToSelect: false,
                 dblClickToEdit: false,
                 dragCheckboxMultiselect: false,
+                maintainSelected: false,
                 commonSearch: true,
-                showToggle: false,
-                showExport: false,
+                showToggle: true,
+                showColumns: true,
+                showExport: true,
+                search: true,
                 smartDisplay: false,
                 responseHandler: function (res) {
                     if (res && res.activeYm && (Controller.wffTab === 'audit' || Controller.wffTab === 'confirm')) {
@@ -832,6 +1176,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             });
 
             Table.api.bindevent(table);
+            // 本页不需要「跨页选择模式」提示
+            table.closest('.bootstrap-table').find('.btn-selected-tips').remove();
+            $('#procuremen-toolbar-host .btn-selected-tips, #toolbar .btn-selected-tips').remove();
+            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();
+            });
 
             table.off('mouseenter.procuremenSupplierLines mouseleave.procuremenSupplierLines', '.procuremen-supplier-lines-cell')
                 .on('mouseenter.procuremenSupplierLines', '.procuremen-supplier-lines-cell', function () {
@@ -906,9 +1256,27 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 setTimeout(procuremenSyncTableHeight, 150);
             });
             $(window).off('resize.procuremenIndex').on('resize.procuremenIndex', function () {
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
+                }
                 procuremenTableHeightCached = 0;
                 procuremenSyncTableHeight();
             });
+            $(document).off('fa.sidebar.resized.procuremenIndex fa.table.relayout.procuremenIndex')
+                .on('fa.sidebar.resized.procuremenIndex fa.table.relayout.procuremenIndex', function () {
+                    if ($('body').hasClass('fa-sidebar-resizing')) {
+                        return;
+                    }
+                    procuremenTableHeightCached = 0;
+                    var $bt = table.closest('.bootstrap-table');
+                    $bt.find('.fixed-table-header').css({paddingRight: '', marginRight: ''});
+                    $bt.find('.fixed-table-header thead th').css({width: '', minWidth: '', maxWidth: ''});
+                    try {
+                        table.bootstrapTable('resetView', {height: procuremenCalcTableHeight()});
+                    } catch (ignore) {
+                    }
+                    procuremenScheduleAlign();
+                });
 
             function procuremenEscHtml(s) {
                 return String(s == null ? '' : s)
@@ -1232,9 +1600,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 if (!v) {
                     return false;
                 }
-                if (v.q === '' && v.p === '') {
-                    return false;
-                }
+                // 允许清空:只要与库中原值不同即视为已修改(两个都删空也能保存)
                 return v.q !== v.origQ || v.p !== v.origP;
             }
             function procuremenEnsurePoPopover() {
@@ -1308,6 +1674,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 if (isNaN(rowIdx)) {
                     return;
                 }
+                // 切到另一行时,上一行有未保存修改则先自动保存
+                if (procuremenPoActiveRow !== null && procuremenPoActiveRow !== rowIdx
+                    && procuremenPoRowDirty(procuremenPoActiveRow)) {
+                    procuremenSavePoRow(procuremenPoActiveRow);
+                }
                 var v = procuremenPoRowValues(rowIdx);
                 if (!v) {
                     return;
@@ -1326,7 +1697,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     return;
                 }
                 if (!procuremenPoRowDirty(rowIdx)) {
-                    Toastr.info('请先填写并修改本次数量或最高限价');
+                    Toastr.info('没有需要保存的修改');
                     return;
                 }
                 var row = $.extend({}, v.baseRow);
@@ -1396,6 +1767,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 if ($t.closest('.procuremen-po-field, .procuremen-po-popover').length) {
                     return;
                 }
+                // 点到别处时:有未保存修改则自动保存(避免删空后忘点保存)
+                var rowIdx = procuremenPoActiveRow;
+                if (rowIdx !== null && procuremenPoRowDirty(rowIdx)) {
+                    procuremenSavePoRow(rowIdx);
+                    return;
+                }
                 procuremenPoPopoverHide();
             });
             table.on('refresh.bs.table load-success.bs.table', function () {
@@ -1538,9 +1915,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 tableRoot.addEventListener('click', Controller._procuremenOpTableClick, true);
             }
 
-            $layout.find('.procuremen-main').off('click.procuremenTbRefresh').on('click.procuremenTbRefresh', '#procuremen-toolbar-host .btn-refresh, .procuremen-table-area #toolbar .btn-refresh', function (e) {
+            $layout.find('.procuremen-main').off('click.procuremenTbRefresh').on('click.procuremenTbRefresh', '.bootstrap-table > .fixed-table-toolbar .btn-refresh, #procuremen-toolbar-host .btn-refresh, .procuremen-table-area #toolbar .btn-refresh', function (e) {
                 e.preventDefault();
-                var $spinFa = $('#procuremen-toolbar-host .btn-refresh .fa, .procuremen-table-area #toolbar .btn-refresh .fa');
+                var $spinFa = $('.bootstrap-table > .fixed-table-toolbar .btn-refresh .fa, #procuremen-toolbar-host .btn-refresh .fa, .procuremen-table-area #toolbar .btn-refresh .fa');
                 $spinFa.addClass('fa-spin');
                 var apiBase = ($layout.attr('data-procuremen-redis-api') || '').toString().trim();
                 if (apiBase) {
@@ -1570,7 +1947,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 }, 0);
             });
             table.on('post-body.bs.table', function () {
-                $('#procuremen-toolbar-host .btn-refresh .fa').removeClass('fa-spin');
+                $('#procuremen-toolbar-host .btn-refresh .fa, .bootstrap-table > .fixed-table-toolbar .btn-refresh .fa').removeClass('fa-spin');
+                procuremenScheduleAlign();
                 if (Controller.wffTab !== 'pick' && Controller.wffTab !== 'audit') {
                     return;
                 }
@@ -1587,6 +1965,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     }
                 });
             });
+            table.on('column-switch.bs.table reset-view.bs.table', function () {
+                procuremenScheduleAlign();
+            });
             if ($bt.length) {
                 $bt.off('click.procuremenCbTd', 'tbody td.bs-checkbox').on('click.procuremenCbTd', 'tbody td.bs-checkbox', function (e) {
                     if ((Controller.wffTab !== 'pick' && Controller.wffTab !== 'audit') || $(e.target).is('input[type="checkbox"]')) {
@@ -1643,6 +2024,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     rfqHeightTimer = null;
                     var h = rfqCalcTableHeight();
                     if (rfqHeightCached > 0 && Math.abs(rfqHeightCached - h) <= 3) {
+                        rfqFitEmptyState();
                         return;
                     }
                     rfqHeightCached = h;
@@ -1650,9 +2032,29 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         table.bootstrapTable('resetView', {height: h});
                     } catch (ignore) {
                     }
+                    rfqFitEmptyState();
                 }, 100);
             }
 
+            /** 无数据时占满表体高度,文案垂直居中到底部区域 */
+            function rfqFitEmptyState() {
+                var $bt = table.closest('.bootstrap-table');
+                var $body = $bt.find('.fixed-table-body').first();
+                var $tr = $body.find('tr.no-records-found');
+                if (!$tr.length || !$body.length) {
+                    return;
+                }
+                var h = Math.max(160, Math.floor($body.innerHeight() || 0) - 4);
+                $tr.find('> td').css({
+                    height: h + 'px',
+                    verticalAlign: 'middle',
+                    textAlign: 'center',
+                    color: '#8c8c8c',
+                    fontSize: '14px',
+                    border: 'none'
+                });
+            }
+
             var columns = [
                 {field: 'CCYDH', title: '订单号', operate: 'LIKE', width: 120},
                 {field: 'CYJMC', title: '印件名称', operate: 'LIKE', class: 'autocontent', formatter: Table.api.formatter.content},
@@ -1736,20 +2138,38 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 pageSize: Config.pagesize || localStorage.getItem('pagesize') || 20,
                 pageList: [10, 15, 20, 25, 50],
                 showJumpto: true,
+                formatNoMatches: function () {
+                    return '暂无数据';
+                },
                 columns: [columns]
             });
 
             Table.api.bindevent(table);
 
-            table.on('load-success.bs.table', function () {
+            table.on('post-body.bs.table load-success.bs.table', function () {
                 rfqSyncTableHeight();
+                setTimeout(rfqFitEmptyState, 0);
             });
             $(window).off('resize.procuremenRfqlist').on('resize.procuremenRfqlist', function () {
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
+                }
                 rfqHeightCached = 0;
                 rfqSyncTableHeight();
             });
+            $(document).off('fa.sidebar.resized.procuremenRfq fa.table.relayout.procuremenRfq')
+                .on('fa.sidebar.resized.procuremenRfq fa.table.relayout.procuremenRfq', function () {
+                    if ($('body').hasClass('fa-sidebar-resizing')) {
+                        return;
+                    }
+                    rfqHeightCached = 0;
+                    rfqSyncTableHeight();
+                });
             $(document).off('click.procuremenRfqCommonSearch', 'button[name="commonSearch"]').on('click.procuremenRfqCommonSearch', 'button[name="commonSearch"]', function () {
-                setTimeout(rfqSyncTableHeight, 150);
+                setTimeout(function () {
+                    rfqSyncTableHeight();
+                    rfqFitEmptyState();
+                }, 150);
             });
 
             $(document).off('click.procuremenRfqDetails', '.btn-rfq-details').on('click.procuremenRfqDetails', '.btn-rfq-details', function (e) {
@@ -3432,7 +3852,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                     [
                         $.extend({field: 'id', title: __('Id'), width: 60, operate: false}, colCenter),
                         $.extend({field: 'ccydh', title: '订单号', operate: 'LIKE'}, colCenter),
-                        $.extend({field: 'send_time', title: '发送时间', operate: 'RANGE', addclass: 'datetimerange', sortable: true}, colCenter),
                         $.extend({field: 'from_email', title: '发件邮箱', operate: 'LIKE', formatter: function (v, row) {
                             return row.from_email_masked || v || '';
                         }}, colCenter),
@@ -3451,6 +3870,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                 : '<span class="text-danger">' + t + '</span>';
                         }}, colCenter),
                         $.extend({field: 'admin_name', title: '操作人', operate: 'LIKE'}, colCenter),
+                        $.extend({field: 'send_time', title: '操作时间', operate: 'RANGE', addclass: 'datetimerange', sortable: true}, colCenter),
                         $.extend({field: 'fail_reason', title: '失败原因', operate: false, class: 'autocontent', formatter: Table.api.formatter.content}, colCenter)
                     ]
                 ]

+ 39 - 41
public/assets/js/backend/procuremenarchive.js

@@ -28,34 +28,30 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
             });
 
             var table = $("#table");
-            var archiveHeightCached = 0;
-            var archiveHeightTimer = null;
 
-            function archiveCalcTableHeight() {
-                var el = table[0];
-                if (!el) {
-                    return 400;
-                }
-                var top = el.getBoundingClientRect().top;
-                return Math.max(300, Math.floor(window.innerHeight - top - 28));
+            function archiveCellText(value) {
+                var text = archiveEscHtml(value == null ? '' : value);
+                return "<div class='autocontent-item' style='white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;width:100%;box-sizing:border-box;'>" + text + "</div>";
             }
 
-            function archiveSyncTableHeight() {
-                if (archiveHeightTimer) {
-                    clearTimeout(archiveHeightTimer);
+            /** 让省略宽度跟单元格实际宽度一致,避免列很宽却只显示 250px */
+            function archiveFitAutocontent() {
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
                 }
-                archiveHeightTimer = setTimeout(function () {
-                    archiveHeightTimer = null;
-                    var h = archiveCalcTableHeight();
-                    if (archiveHeightCached > 0 && Math.abs(archiveHeightCached - h) <= 3) {
+                table.closest('.bootstrap-table').find('td.autocontent').each(function () {
+                    var td = this;
+                    var $item = $(td).children('.autocontent-item').first();
+                    if (!$item.length) {
                         return;
                     }
-                    archiveHeightCached = h;
-                    try {
-                        table.bootstrapTable('resetView', {height: h});
-                    } catch (ignore) {
+                    var cs = window.getComputedStyle(td);
+                    var pad = (parseFloat(cs.paddingLeft) || 0) + (parseFloat(cs.paddingRight) || 0);
+                    var w = Math.floor(td.clientWidth - pad);
+                    if (w > 0) {
+                        $item.css({maxWidth: w + 'px', width: w + 'px'});
                     }
-                }, 100);
+                });
             }
 
             table.bootstrapTable({
@@ -63,8 +59,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 pk: 'scydgy_id',
                 sortName: 'id',
                 sortOrder: 'desc',
-                height: archiveCalcTableHeight(),
                 commonSearch: true,
+                search: true,
                 pagination: true,
                 smartDisplay: false,
                 pageSize: Config.pagesize || localStorage.getItem('pagesize') || 20,
@@ -72,39 +68,35 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 showJumpto: true,
                 columns: [
                     [
-                        {checkbox: true},
-                        {field: 'CCYDH', title: '订单号', operate: 'LIKE', width: 120},
+                        {checkbox: true, width: 36},
+                        {field: 'CCYDH', title: '订单号', operate: 'LIKE', width: 140, align: 'left'},
                         {
                             field: 'CYJMC',
                             title: '印件名称',
                             operate: 'LIKE',
+                            class: 'autocontent',
                             formatter: function (value) {
-                                return archiveEscHtml(value == null ? '' : value);
-                            },
-                            cellStyle: function () {
-                                return {css: {'white-space': 'normal', 'word-break': 'break-all', 'min-width': '220px'}};
+                                return archiveCellText(value);
                             }
                         },
                         {
                             field: 'CGYMC',
                             title: '工序名称',
                             operate: 'LIKE',
+                            width: 140,
+                            class: 'autocontent',
                             formatter: function (value) {
-                                return archiveEscHtml(value == null ? '' : value);
-                            },
-                            cellStyle: function () {
-                                return {css: {'white-space': 'normal', 'word-break': 'break-all', 'min-width': '140px'}};
+                                return archiveCellText(value);
                             }
                         },
                         {
                             field: 'pick_company_name',
                             title: '已选供应商',
                             operate: 'LIKE',
+                            width: 180,
+                            class: 'autocontent',
                             formatter: function (value) {
-                                return archiveEscHtml(value == null ? '' : value);
-                            },
-                            cellStyle: function () {
-                                return {css: {'white-space': 'normal', 'word-break': 'break-all', 'min-width': '180px'}};
+                                return archiveCellText(value);
                             }
                         },
                         {
@@ -153,15 +145,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
 
             Table.api.bindevent(table);
 
-            table.on('load-success.bs.table', function () {
-                archiveSyncTableHeight();
+            table.on('post-body.bs.table load-success.bs.table', function () {
+                setTimeout(archiveFitAutocontent, 0);
             });
             $(window).off('resize.procuremenArchive').on('resize.procuremenArchive', function () {
-                archiveHeightCached = 0;
-                archiveSyncTableHeight();
+                if ($('body').hasClass('fa-sidebar-resizing')) {
+                    return;
+                }
+                setTimeout(archiveFitAutocontent, 40);
             });
+            $(document).off('fa.sidebar.resized.procuremenArchive fa.table.relayout.procuremenArchive')
+                .on('fa.sidebar.resized.procuremenArchive fa.table.relayout.procuremenArchive', function () {
+                    setTimeout(archiveFitAutocontent, 40);
+                });
             $(document).off('click.procuremenArchiveCommonSearch', 'button[name="commonSearch"]').on('click.procuremenArchiveCommonSearch', 'button[name="commonSearch"]', function () {
-                setTimeout(archiveSyncTableHeight, 150);
+                setTimeout(archiveFitAutocontent, 150);
             });
 
             $(document).off('click.procuremenArchiveDetails', '.btn-archive-details').on('click.procuremenArchiveDetails', '.btn-archive-details', function (e) {

+ 10 - 9
public/assets/js/backend/procuremenexport.js

@@ -50,17 +50,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                 pageSize: Config.pagesize || localStorage.getItem('pagesize') || 20,
                 pageList: [10, 15, 20, 25, 50],
                 showJumpto: true,
-                commonSearch: false,
-                search: false,
+                commonSearch: true,
+                search: true,
                 columns: [
                     [
-                        {field: 'ym', title: '月份', width: 88},
-                        {field: 'CCYDH', title: '订单号'},
-                        {field: 'CYJMC', title: '印件名称', class: 'autocontent', formatter: Table.api.formatter.content},
-                        {field: 'CGYMC', title: '工序名称', class: 'autocontent', formatter: Table.api.formatter.content},
-                        {field: 'createtime_text', title: '完结时间', width: 165},
-                        {field: 'row_count', title: '工序数', width: 72, align: 'center'},
-                        {field: 'total_amount', title: '金额合计', formatter: function (value, row) {
+                        {field: 'ym', title: '月份', width: 88, operate: false},
+                        {field: 'CCYDH', title: '订单号', operate: 'LIKE'},
+                        {field: 'CYJMC', title: '印件名称', class: 'autocontent', operate: 'LIKE', formatter: Table.api.formatter.content},
+                        {field: 'CGYMC', title: '工序名称', class: 'autocontent', operate: 'LIKE', formatter: Table.api.formatter.content},
+                        {field: 'createtime_text', title: '完结时间', width: 165, operate: 'LIKE'},
+                        {field: 'row_count', title: '工序数', width: 72, align: 'center', operate: false},
+                        {field: 'total_amount', title: '金额合计', operate: false, formatter: function (value, row) {
                             return row.total_amount_text != null && row.total_amount_text !== ''
                                 ? row.total_amount_text
                                 : (value != null ? String(value) : '');
@@ -70,6 +70,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             title: '操作',
                             width: 88,
                             align: 'center',
+                            operate: false,
                             formatter: function (value, row) {
                                 var sid = row && row.scydgy_id;
                                 if (!sid) {

+ 15 - 15
public/assets/js/backend/purchasecontent.js

@@ -50,6 +50,21 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {checkbox: true},
                         {field: 'id', title: 'ID', width: 60, operate: false, sortable: true},
                         {field: 'sender_name', title: '投递人', operate: false, width: 100, align: 'center', sortable: true},
+                        {
+                            field: 'createtime',
+                            title: '操作时间',
+                            operate: 'RANGE',
+                            addclass: 'datetimerange',
+                            width: 165,
+                            align: 'center',
+                            sortable: true,
+                            formatter: function (value, row) {
+                                if (row.send_time_text) {
+                                    return row.send_time_text;
+                                }
+                                return Table.api.formatter.datetime.call(this, value, row);
+                            }
+                        },
                         {
                             field: 'recipient_names',
                             title: '投递给',
@@ -76,21 +91,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             sortable: true,
                             formatter: Table.api.formatter.content
                         },
-                        {
-                            field: 'createtime',
-                            title: '投递时间',
-                            operate: 'RANGE',
-                            addclass: 'datetimerange',
-                            width: 165,
-                            align: 'center',
-                            sortable: true,
-                            formatter: function (value, row) {
-                                if (row.send_time_text) {
-                                    return row.send_time_text;
-                                }
-                                return Table.api.formatter.datetime.call(this, value, row);
-                            }
-                        },
                         {
                             field: 'is_read',
                             title: '状态',

+ 9 - 0
public/assets/js/require-table.js

@@ -35,6 +35,9 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
             showRefresh: false,
             showJumpto: true,
             locale: Config.language == 'zh-cn' ? 'zh-CN' : 'en-US',
+            formatNoMatches: function () {
+                return '暂无数据';
+            },
             showToggle: true,
             showColumns: true,
             pk: 'id',
@@ -144,8 +147,14 @@ define(['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstrap-table
                     },
                     formatJumpto: function () {
                         return __('Go');
+                    },
+                    formatNoMatches: function () {
+                        return '暂无数据';
                     }
                 }, locales);
+                $.fn.bootstrapTable.defaults.formatNoMatches = function () {
+                    return '暂无数据';
+                };
                 // 如果是iOS设备则判断是否启用卡片视图
                 if ($.fn.bootstrapTable.defaults.iosCardView && navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
                     Table.defaults.cardView = true;