{"id":51,"date":"2026-05-25T15:33:30","date_gmt":"2026-05-25T07:33:30","guid":{"rendered":"http:\/\/supenguin.asuscomm.com:8080\/?page_id=51"},"modified":"2026-10-04T21:44:32","modified_gmt":"2026-10-04T13:44:32","slug":"%e5%a0%b1%e4%bf%ae%e5%96%ae%e7%b6%9c%e5%90%88%e6%9f%a5%e8%a9%a2","status":"publish","type":"page","link":"https:\/\/supenguin.com\/?page_id=51","title":{"rendered":"\u5831\u4fee\u55ae\u7d9c\u5408\u67e5\u8a62"},"content":{"rendered":"\n<div class=\"search-center-container\">\n    <h2>\ud83d\udd0d IT \u5831\u4fee\u55ae\u7d9c\u5408\u67e5\u8a62\u4e2d\u5fc3<\/h2>\n    <p style=\"color: #aaa; font-size:13px; margin-bottom:20px;\">\u8acb\u9078\u64c7\u60a8\u60f3\u4f7f\u7528\u7684\u67e5\u8a62\u7dad\u5ea6\uff0c\u5feb\u901f\u8abf\u53d6\u6b77\u53f2\u5831\u4fee\u7d00\u9304\u8207\u8655\u7406\u9032\u5ea6\u3002<\/p>\n    \n    <div class=\"search-tabs\">\n        <button class=\"tab-btn active\" onclick=\"switchSearchTab('device')\">\ud83d\udda5\ufe0f \u4f9d\u8a2d\u5099\u8cc7\u7522<\/button>\n        <button class=\"tab-btn\" onclick=\"switchSearchTab('date')\">\ud83d\udcc5 \u4f9d\u65e5\u671f\u5340\u9593<\/button>\n        <button class=\"tab-btn\" onclick=\"switchSearchTab('status')\">\ud83d\udea6 \u4f9d\u6848\u4ef6\u72c0\u614b<\/button>\n    <\/div>\n    \n    <div class=\"search-body\">\n        <div id=\"panel_device\" class=\"search-panel active\">\n            <label>\u8acb\u8f38\u5165 \u8a2d\u5099\u8ca1\u7522\u7de8\u865f \u6216 \u96fb\u8166\u540d\u7a31<\/label>\n            <div class=\"input-group\">\n                <input type=\"text\" id=\"sch_keyword\" placeholder=\"\u4f8b\u5982: PC-2026-0001 \u6216 IT-DESKTOP\">\n                <button type=\"button\" onclick=\"executeSearch('device')\">\u641c\u5c0b<\/button>\n            <\/div>\n        <\/div>\n        \n        <div id=\"panel_date\" class=\"search-panel\">\n            <label>\u8acb\u9078\u64c7\u5831\u4fee\u65e5\u671f\u7bc4\u570d<\/label>\n            <div class=\"input-group date-group\">\n                <input type=\"date\" id=\"sch_start_date\">\n                <span style=\"align-self: center; color: #aaa;\">\u81f3<\/span>\n                <input type=\"date\" id=\"sch_end_date\">\n                <button type=\"button\" onclick=\"executeSearch('date')\">\u7be9\u9078\u5340\u9593<\/button>\n            <\/div>\n        <\/div>\n        \n        <div id=\"panel_status\" class=\"search-panel\">\n            <label>\u8acb\u9078\u64c7\u6848\u4ef6\u76ee\u524d\u9032\u5ea6\u72c0\u614b<\/label>\n            <div class=\"input-group\">\n                <select id=\"sch_status\">\n                    <option value=\"\u5f85\u8655\u7406\">\ud83d\udd34 \u5f85\u8655\u7406 (\u65b0\u9032\u55ae)<\/option>\n                    <option value=\"\u7dad\u4fee\u4e2d\">\ud83d\udfe0 \u7dad\u4fee\u4e2d \/ \u8655\u7406\u4e2d<\/option>\n                    <option value=\"\u5df2\u7d50\u6848\">\ud83d\udfe2 \u5df2\u7d50\u6848 (\u7dad\u4fee\u5b8c\u7562)<\/option>\n                <\/select>\n                <button type=\"button\" onclick=\"executeSearch('status')\">\u7be9\u9078\u72c0\u614b<\/button>\n            <\/div>\n        <\/div>\n    <\/div>\n    \n    <div id=\"search_loading\" style=\"display:none; text-align:center; padding:15px; color:#ffb100; font-weight:bold;\">\ud83d\udd0d \u6b63\u5728\u6aa2\u7d22\u8cc7\u6599\u5eab\uff0c\u8acb\u7a0d\u5019&#8230;<\/div>\n    <div id=\"search_error\" class=\"search-error-box\" style=\"display:none;\"><\/div>\n    \n    <div id=\"results_wrapper\" style=\"display:none; margin-top:25px;\">\n        <h3>\ud83d\udcca \u6aa2\u7d22\u7d50\u679c\u6e05\u55ae (<span id=\"results_count\" style=\"color:#ffb100;\">0<\/span> \u7b46)<\/h3>\n        <div style=\"overflow-x: auto;\">\n            <table class=\"results-table\">\n                <thead>\n                    <tr>\n                        <th>\u670d\u52d9\u7de8\u865f<\/th>\n                        <th>\u5831\u4fee\u65e5\u671f<\/th>\n                        <th>\u8ca1\u7522\u7de8\u865f \/ \u96fb\u8166\u540d\u7a31<\/th>\n                        <th>\u554f\u984c\u985e\u578b<\/th>\n                        <th>\u7576\u524d\u72c0\u614b<\/th>\n                        <th>\u64cd\u4f5c<\/th>\n                    <\/tr>\n                <\/thead>\n                <tbody id=\"results_tbody\">\n                    <\/tbody>\n            <\/table>\n        <\/div>\n    <\/div>\n<\/div>\n\n<style>\n.search-center-container { background: #1e1e1e; color: #fff; padding: 30px; border-radius: 8px; max-width: 900px; margin: 20px auto; font-family: sans-serif; border: 1px solid #333; }\n.search-center-container h2 { margin-top:0; color:#ffb100; }\n.search-tabs { display: flex; gap: 5px; border-bottom: 2px solid #333; margin-bottom: 20px; }\n.tab-btn { background: #2d2d2d; color: #aaa; border: none; padding: 10px 20px; cursor: pointer; font-size: 14px; font-weight: bold; border-top-left-radius: 4px; border-top-right-radius: 4px; transition: all 0.2s; }\n.tab-btn:hover { background: #3d3d3d; color: #fff; }\n.tab-btn.active { background: #0073aa; color: #fff; }\n.search-panel { display: none; background: #252525; padding: 15px; border-radius: 6px; border: 1px solid #3d3d3d; }\n.search-panel.active { display: block; }\n.search-panel label { display: block; font-size: 14px; color: #ccc; margin-bottom: 8px; font-weight: bold; }\n.input-group { display: flex; gap: 10px; }\n.input-group input, .input-group select { flex: 1; padding: 10px; background: #1a1a1a; border: 1px solid #555; color: #fff; border-radius: 4px; }\n.input-group button { background: #28a745; color: #fff; border: none; padding: 0 25px; border-radius: 4px; font-weight: bold; cursor: pointer; }\n.input-group button:hover { background: #218838; }\n.date-group input { flex: 1; }\n.search-error-box { background: #f8d7da; color: #721c24; padding: 12px; border-radius: 4px; margin-top: 15px; font-weight: bold; text-align: center; }\n\n\/* \u8868\u683c\u6a23\u5f0f *\/\n.results-table { width: 100%; border-collapse: collapse; margin-top: 10px; }\n.results-table th, .results-table td { padding: 12px; border: 1px solid #444; text-align: left; font-size: 14px; }\n.results-table th { background: #2d2d2d; color: #ffb100; font-weight: bold; }\n.results-table tbody tr { background: #1a1a1a; transition: background 0.2s; }\n.results-table tbody tr:hover { background: #252525; }\n.badge-status { padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; display: inline-block; }\n.bg-wait { background: #d9534f; color: #fff; }\n.bg-process { background: #f0ad4e; color: #000; }\n.bg-done { background: #5cb85c; color: #fff; }\n.btn-view-link { background: #0073aa; color: #fff; text-decoration: none; padding: 5px 12px; border-radius: 4px; font-size: 12px; font-weight: bold; display: inline-block; }\n.btn-view-link:hover { background: #008ec2; }\n\n\/* \ud83d\udcf1 \u624b\u6a5f\u97ff\u61c9\u5f0f\u9632\u7834\u7248\u8207\u6b04\u4f4d\u81ea\u52d5\u5f80\u4e0b\u6389\u4fee\u6b63\uff08\u901a\u7528\u7248\uff09 *\/\n@media (max-width: 768px) {\n    \/* 1. \u5f37\u5236\u6240\u6709\u5143\u7d20\u3001\u6846\u7dda\u3001\u5167\u8ddd\u90fd\u5305\u542b\u5728\u5bec\u5ea6\u5167\uff0c\u7d55\u4e0d\u5411\u53f3\u8dd1\u51fa\u53bb *\/\n    *, *:before, *:after {\n        box-sizing: border-box !important;\n    }\n\n    \/* 2. \u8b93\u4e3b\u5bb9\u5668\u8207\u5340\u584a\u5bec\u5ea6\u767e\u5206\u6bd4\u8cbc\u9f4a\u624b\u6a5f\u87a2\u5e55\uff0c\u6e05\u9664\u591a\u9918\u5de6\u53f3\u908a\u8ddd *\/\n    .dev-manager-container, \n    .ticket-container, \n    .search-center-container {\n        padding: 10px !important;\n        margin: 5px !important;\n        max-width: 100% !important;\n        width: 100% !important;\n        overflow-x: hidden !important;\n    }\n\n    \/* 3. \u5c07\u4e0a\u65b9\u7684\u641c\u5c0b\u5217\u6216\u7fa4\u7d44\u6539\u70ba\u4e0a\u4e0b\u5806\u758a *\/\n    .search-box, .search-group, .input-group {\n        flex-direction: column !important;\n        width: 100% !important;\n    }\n    .search-box button, .search-box input, \n    .search-group button, .search-group input, \n    .input-group button, .input-group input {\n        width: 100% !important;\n    }\n\n    \/* 4. \u5c07\u591a\u6b04\u6392\u7248\u5f37\u5236\u6539\u70ba\u55ae\u6b04\u5782\u76f4\u6392\u5217\uff0c\u78ba\u4fdd\u5bec\u5ea6 100% *\/\n    .grid-2, .grid-3, div[style*=\"grid-template-columns\"] {\n        display: flex !important;\n        flex-direction: column !important;\n        gap: 12px !important;\n        width: 100% !important;\n    }\n\n    \/* 5. \u78ba\u4fdd\u6240\u6709\u7684\u8868\u55ae\u7fa4\u7d44\u3001\u8f38\u5165\u6846\u3001\u4e0b\u62c9\u9078\u55ae\u3001\u6587\u5b57\u5340\u57df\u7d55\u4e0d\u8d85\u51fa\u756b\u9762 *\/\n    .form-group, \n    .license-fieldset, \n    input[type=\"text\"], \n    input[type=\"date\"], \n    input[type=\"number\"], \n    input[type=\"password\"],\n    select, \n    textarea {\n        width: 100% !important;\n        max-width: 100% !important;\n        min-width: 0 !important;\n    }\n}\n\n<\/style>\n\n<script>\nlet currentSearchType = 'device';\n\n\/\/ \u5207\u63db\u9801\u7c64\nfunction switchSearchTab(type) {\n    currentSearchType = type;\n    document.querySelectorAll('.tab-btn').forEach(btn => btn.classList.remove('active'));\n    document.querySelectorAll('.search-panel').forEach(panel => panel.classList.remove('active'));\n    \n    \/\/ \u4fee\u6b63\uff1a\u5728 WordPress\/PowerShell \u74b0\u5883\u4e2d\u76f8\u5bb9 event \u7684\u5beb\u6cd5\n    if (window.event) {\n        window.event.currentTarget.classList.add('active');\n    }\n    document.getElementById('panel_' + type).classList.add('active');\n    \n    \/\/ \u6e05\u7a7a\u820a\u7684\u932f\u8aa4\u8a0a\u606f\n    document.getElementById('search_error').style.display = 'none';\n}\n\n\/\/ \u57f7\u884c Ajax \u67e5\u8a62 (\u5df2\u6539\u7528\u539f\u751f fetch \u6280\u8853\uff0c\u5fb9\u5e95\u514d\u9664 jQuery \u4f9d\u8cf4)\nfunction executeSearch(type) {\n    const ajaxUrl = window.location.origin + '\/wp-admin\/admin-ajax.php';\n    \n    document.getElementById('search_loading').style.display = 'block';\n    document.getElementById('search_error').style.display = 'none';\n    document.getElementById('results_wrapper').style.display = 'none';\n    \n    \/\/ \u6536\u96c6\u9078\u5b9a\u7684\u6b04\u4f4d\u8cc7\u6599\n    const keywordVal = document.getElementById('sch_keyword') ? document.getElementById('sch_keyword').value.trim() : '';\n    const startDateVal = document.getElementById('sch_start_date') ? document.getElementById('sch_start_date').value : '';\n    const endDateVal = document.getElementById('sch_end_date') ? document.getElementById('sch_end_date').value : '';\n    const statusVal = document.getElementById('sch_status') ? document.getElementById('sch_status').value : '';\n\n    \/\/ \u4f7f\u7528 URLSearchParams \u6a21\u64ec jQuery \u7684 POST Form Data \u683c\u5f0f\n    const formData = new URLSearchParams();\n    formData.append('action', 'search_repair_tickets');\n    formData.append('search_type', type);\n    formData.append('keyword', keywordVal);\n    formData.append('start_date', startDateVal);\n    formData.append('end_date', endDateVal);\n    formData.append('status', statusVal);\n    \n    \/\/ \u73fe\u4ee3\u539f\u751f Fetch API\n    fetch(ajaxUrl, {\n        method: 'POST',\n        headers: {\n            'Content-Type': 'application\/x-www-form-urlencoded; charset=UTF-8'\n        },\n        body: formData.toString()\n    })\n    .then(res => {\n        if (!res.ok) throw new Error('\u7db2\u8def\u56de\u61c9\u4e0d\u6b63\u5e38');\n        return res.json();\n    })\n    .then(response => {\n        document.getElementById('search_loading').style.display = 'none';\n        \n        if(response.success) {\n            const list = response.data;\n            document.getElementById('results_count').innerText = list.length;\n            \n            const tbody = document.getElementById('results_tbody');\n            tbody.innerHTML = '';\n            \n            list.forEach(ticket => {\n                const tr = document.createElement('tr');\n                \n                \/\/ \u667a\u6167\u72c0\u614b\u6a19\u7c64\n                let statusBadge = '';\n                if(ticket.ticket_status === '\u5f85\u8655\u7406') statusBadge = `<span class=\"badge-status bg-wait\">\u5f85\u8655\u7406<\/span>`;\n                else if(ticket.ticket_status === '\u7dad\u4fee\u4e2d' || ticket.ticket_status === '\u8655\u7406\u4e2d') statusBadge = `<span class=\"badge-status bg-process\">\u7dad\u4fee\u4e2d<\/span>`;\n                else if(ticket.ticket_status === '\u5df2\u7d50\u6848') statusBadge = `<span class=\"badge-status bg-done\">\u5df2\u7d50\u6848<\/span>`;\n                \n                \/\/ \u667a\u6167\u6309\u9215\u9023\u7d50\n                const viewUrl = window.location.origin + '\/?page_id=43&ticket=' + encodeURIComponent(ticket.service_id);\n                \n                tr.innerHTML = `\n                    <td style=\"color:#ffb100; font-weight:bold;\">${ticket.service_id}<\/td>\n                    <td>${ticket.created_at ? ticket.created_at.substring(0, 10) : ''}<\/td>\n                    <td><b>${ticket.property_id || ''}<\/b><br><span style=\"font-size:12px; color:#aaa;\">${ticket.computer_name || 'N\/A'}<\/span><\/td>\n                    <td>${ticket.issue_type || ''}<\/td>\n                    <td>${statusBadge}<\/td>\n                    <td><a href=\"${viewUrl}\" class=\"btn-view-link\" target=\"_blank\">\ud83d\udc41\ufe0f \u67e5\u770b\u9032\u5ea6<\/a><\/td>\n                `;\n                tbody.appendChild(tr);\n            });\n            \n            document.getElementById('results_wrapper').style.display = 'block';\n        } else {\n            document.getElementById('search_error').innerText = response.data || '\u67e5\u7121\u8cc7\u6599';\n            document.getElementById('search_error').style.display = 'block';\n        }\n    })\n    .catch(error => {\n        document.getElementById('search_loading').style.display = 'none';\n        document.getElementById('search_error').innerText = '\u274c \u7cfb\u7d71\u9023\u7dda\u8d85\u6642\uff0c\u6216\u5f8c\u7aef PHP \u767c\u751f\u932f\u8aa4\u3002';\n        document.getElementById('search_error').style.display = 'block';\n        console.error('Error:', error);\n    });\n}\n\n\/\/ \u9801\u9762\u8f09\u5165\u5b8c\u6210\u5f8c\uff0c\u81ea\u52d5\u5c07\u65e5\u671f\u5340\u9593\u9810\u8a2d\u70ba\u4eca\u5929\ndocument.addEventListener('DOMContentLoaded', function() {\n    const today = new Date().toISOString().split('T')[0];\n    \n    const startDateInput = document.getElementById('sch_start_date');\n    const endDateInput = document.getElementById('sch_end_date');\n    \n    if (startDateInput && !startDateInput.value) {\n        startDateInput.value = today;\n    }\n    if (endDateInput && !endDateInput.value) {\n        endDateInput.value = today;\n    }\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udd0d IT \u5831\u4fee\u55ae\u7d9c\u5408\u67e5\u8a62\u4e2d\u5fc3 \u8acb\u9078\u64c7\u60a8\u60f3\u4f7f\u7528\u7684\u67e5\u8a62\u7dad\u5ea6\uff0c\u5feb\u901f\u8abf\u53d6\u6b77\u53f2\u5831\u4fee\u7d00\u9304\u8207\u8655\u7406\u9032\u5ea6\u3002 \ud83d\udda5\ufe0f \u4f9d\u8a2d\u5099\u8cc7\u7522 \ud83d\udcc5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-51","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/supenguin.com\/index.php?rest_route=\/wp\/v2\/pages\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/supenguin.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/supenguin.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/supenguin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/supenguin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":4,"href":"https:\/\/supenguin.com\/index.php?rest_route=\/wp\/v2\/pages\/51\/revisions"}],"predecessor-version":[{"id":139,"href":"https:\/\/supenguin.com\/index.php?rest_route=\/wp\/v2\/pages\/51\/revisions\/139"}],"wp:attachment":[{"href":"https:\/\/supenguin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}