{"id":9665,"date":"2025-06-06T16:19:12","date_gmt":"2025-06-06T16:19:12","guid":{"rendered":"https:\/\/erytshipping.com\/?page_id=9665"},"modified":"2025-06-06T16:19:12","modified_gmt":"2025-06-06T16:19:12","slug":"cbm","status":"publish","type":"page","link":"https:\/\/erytshipping.com\/zh\/cbm\/","title":{"rendered":"cbm"},"content":{"rendered":"<p dir=\"auto\">    <div class=\"cbm-calculator\">\n        <h2>\u0645\u0627\u0634\u06cc\u0646\u200c\u062d\u0633\u0627\u0628 CBM<\/h2>\n        <form id=\"cbm-form\" class=\"cbm-form-grid\" action=\"\">\n            <div class=\"form-field\">\n                <label for=\"packages\">\u062a\u0639\u062f\u0627\u062f \u0628\u0633\u062a\u0647\u200c\u0647\u0627:<\/label>\n                <input type=\"number\" id=\"packages\" name=\"packages\" step=\"1\" min=\"1\" value=\"1\" required>\n            <\/div>\n            <div class=\"form-field\">\n                <label for=\"length\">\u0637\u0648\u0644 (\u0633\u0627\u0646\u062a\u06cc\u200c\u0645\u062a\u0631):<\/label>\n                <input type=\"number\" id=\"length\" name=\"length\" step=\"any\" required>\n            <\/div>\n            <div class=\"form-field\">\n                <label for=\"width\">\u0639\u0631\u0636 (\u0633\u0627\u0646\u062a\u06cc\u200c\u0645\u062a\u0631):<\/label>\n                <input type=\"number\" id=\"width\" name=\"width\" step=\"any\" required>\n            <\/div>\n            <div class=\"form-field\">\n                <label for=\"height\">\u0627\u0631\u062a\u0641\u0627\u0639 (\u0633\u0627\u0646\u062a\u06cc\u200c\u0645\u062a\u0631):<\/label>\n                <input type=\"number\" id=\"height\" name=\"height\" step=\"any\" required>\n            <\/div>\n            <div class=\"form-field\">\n                <label for=\"weight\">\u0648\u0632\u0646 (\u06a9\u06cc\u0644\u0648\u06af\u0631\u0645):<\/label>\n                <input type=\"number\" id=\"weight\" name=\"weight\" step=\"any\" required>\n            <\/div>\n            <div class=\"form-field form-submit\">\n                <button type=\"submit\">\u0645\u062d\u0627\u0633\u0628\u0647<\/button>\n            <\/div>\n        <input type=\"hidden\" name=\"trp-form-language\" value=\"zh\"\/><\/form>\n        \n        <div id=\"cbm-error\" style=\"display:none; color: red; margin-top: 10px;\">\n            <p>\u0644\u0637\u0641\u0627\u064b \u062a\u0645\u0627\u0645 \u0641\u06cc\u0644\u062f\u0647\u0627 \u0631\u0627 \u067e\u0631 \u06a9\u0646\u06cc\u062f.<\/p>\n        <\/div>\n        \n        <div id=\"cbm-result\" style=\"display:none;\">\n            <h3>\u0646\u062a\u0627\u06cc\u062c \u0645\u062d\u0627\u0633\u0628\u0647<\/h3>\n            <p><strong>\u062d\u062c\u0645 \u06a9\u0644 (CBM):<\/strong> <span id=\"cbm\"><\/span> \u0645\u062a\u0631 \u0645\u06a9\u0639\u0628<\/p>\n            <p><strong>\u062d\u062c\u0645 \u06a9\u0644 (\u0641\u0648\u062a \u0645\u06a9\u0639\u0628):<\/strong> <span id=\"cubic-feet\"><\/span> \u0641\u0648\u062a \u0645\u06a9\u0639\u0628<\/p>\n            <table class=\"cbm-result-table\">\n                <thead>\n                    <tr>\n                        <th>\u0631\u0648\u0634 \u062d\u0645\u0644<\/th>\n                        <th>\u0648\u0632\u0646 \u062d\u062c\u0645\u06cc (\u06a9\u06cc\u0644\u0648\u06af\u0631\u0645)<\/th>\n                        <th>\u0648\u0632\u0646 \u0642\u0627\u0628\u0644 \u0634\u0627\u0631\u0698 (\u06a9\u06cc\u0644\u0648\u06af\u0631\u0645)<\/th>\n                        <th>\u0646\u0648\u0639 \u0628\u0627\u0631<\/th>\n                    <\/tr>\n                <\/thead>\n                <tbody>\n                    <tr>\n                        <td>\u0647\u0648\u0627\u06cc\u06cc<\/td>\n                        <td id=\"volumetric-weight-air\"><\/td>\n                        <td id=\"chargeable-weight-air\"><\/td>\n                        <td id=\"weight-type-air\"><\/td>\n                    <\/tr>\n                    <tr>\n                        <td>\u062f\u0631\u06cc\u0627\u06cc\u06cc<\/td>\n                        <td id=\"volumetric-weight-sea\"><\/td>\n                        <td id=\"chargeable-weight-sea\"><\/td>\n                        <td id=\"weight-type-sea\"><\/td>\n                    <\/tr>\n                    <tr>\n                        <td>\u0632\u0645\u06cc\u0646\u06cc<\/td>\n                        <td id=\"volumetric-weight-land\"><\/td>\n                        <td id=\"chargeable-weight-land\"><\/td>\n                        <td id=\"weight-type-land\"><\/td>\n                    <\/tr>\n                <\/tbody>\n            <\/table>\n        <\/div>\n    <\/div>\n\n    <script>\n        document.getElementById('cbm-form').addEventListener('submit', function(e) {\n            e.preventDefault();\n            \n            \/\/ Get input values\n            let packages = parseInt(document.getElementById('packages').value);\n            let length = parseFloat(document.getElementById('length').value);\n            let width = parseFloat(document.getElementById('width').value);\n            let height = parseFloat(document.getElementById('height').value);\n            let weight = parseFloat(document.getElementById('weight').value);\n            \n            \/\/ Validate inputs\n            if (isNaN(packages) || packages < 1 || isNaN(length) || isNaN(width) || isNaN(height) || isNaN(weight)) {\n                document.getElementById('cbm-error').style.display = 'block';\n                document.getElementById('cbm-result').style.display = 'none';\n                return;\n            }\n            \n            \/\/ Hide error message\n            document.getElementById('cbm-error').style.display = 'none';\n            \n            \/\/ Calculate CBM\n            let cbm = (length * width * height) \/ 1000000 * packages; \/\/ Convert cm\u00b3 to m\u00b3\n            let cubicFeet = cbm * 35.3147; \/\/ Convert CBM to cubic feet\n            let actualWeight = weight * packages;\n            \n            \/\/ Calculate for each transport method\n            let methods = [\n                { name: 'air', factor: 167, label: '\u0647\u0648\u0627\u06cc\u06cc' },\n                { name: 'sea', factor: 1000, label: '\u062f\u0631\u06cc\u0627\u06cc\u06cc' },\n                { name: 'land', factor: 333, label: '\u0632\u0645\u06cc\u0646\u06cc' }\n            ];\n            \n            methods.forEach(method => {\n                let volumetricWeight = cbm * method.factor;\n                let chargeableWeight = Math.max(actualWeight, volumetricWeight);\n                let weightType = (chargeableWeight === actualWeight) ? '\u0648\u0632\u0646\u06cc' : '\u062d\u062c\u0645\u06cc';\n                \n                document.getElementById(`volumetric-weight-${method.name}`).textContent = volumetricWeight.toFixed(2);\n                document.getElementById(`chargeable-weight-${method.name}`).textContent = chargeableWeight.toFixed(2);\n                document.getElementById(`weight-type-${method.name}`).textContent = weightType;\n            });\n            \n            \/\/ Display general results\n            document.getElementById('cbm').textContent = cbm.toFixed(3);\n            document.getElementById('cubic-feet').textContent = cubicFeet.toFixed(3);\n            document.getElementById('cbm-result').style.display = 'block';\n        });\n    <\/script>\n    <\/p>","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-9665","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/pages\/9665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/comments?post=9665"}],"version-history":[{"count":1,"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/pages\/9665\/revisions"}],"predecessor-version":[{"id":9666,"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/pages\/9665\/revisions\/9666"}],"wp:attachment":[{"href":"https:\/\/erytshipping.com\/zh\/wp-json\/wp\/v2\/media?parent=9665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}