{"id":2860,"date":"2025-04-10T07:20:21","date_gmt":"2025-04-10T07:20:21","guid":{"rendered":"https:\/\/kampongkoh.com.au\/?p=2860"},"modified":"2025-04-20T08:17:30","modified_gmt":"2025-04-20T08:17:30","slug":"01-0006-%e8%82%a1%e7%a5%a8%e5%88%86%e6%9e%90%e5%b7%a5%e5%85%b7-prc-%e9%a3%8e%e9%99%a9%e6%a3%80%e6%b5%8b-risk-check","status":"publish","type":"post","link":"https:\/\/kampongkoh.com.au\/?p=2860","title":{"rendered":"01.0006 \u80a1\u7968\u5206\u6790\u5de5\u5177 | PRC \u98ce\u9669\u68c0\u6d4b (Risk Check)"},"content":{"rendered":"\n<script>\n  function calculateScore() {\n    const y1 = parseFloat(document.getElementById(\"pm\").value);\n    const y2 = parseFloat(document.getElementById(\"roe\").value);\n    const y3 = document.getElementById(\"cashflowoperating\").value;\n    const y4 = document.getElementById(\"freecashflow\").value;\n\n    if (isNaN(y1) || isNaN(y2)) {\n      alert(\"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u6570\u503c\uff08\u652f\u6301\u5c0f\u6570\uff09\");\n      return;\n    }\n\n    let PM = 0;\n    if (y1 >= 1.0 && y1 <= 5.5) PM = 5;\n    else if (y1 >= 5.6 && y1 <= 10.5) PM = 10;\n    else if (y1 >= 10.6 && y1 <= 15.9) PM = 15;\n    else if (y1 >= 16.0) PM = 20;\n\n    let ROE = 0;\n    if (y2 >= 1.0 && y2 <= 5.5) ROE = 10;\n    else if (y2 >= 5.6 && y2 <= 10.5) ROE = 20;\n    else if (y2 >= 10.6 && y2 <= 15.9) ROE = 30;\n    else if (y2 >= 16.0) ROE = 40;\n\n    let CF = 0;\n    if (y3 === \"profit\" && y4 === \"positive\") CF = 40;\n    else if (y3 === \"profit\" && y4 === \"negative\") CF = 30;\n    else if (y3 === \"deficit\" && y4 === \"positive\") CF = 20;\n    else if (y3 === \"deficit\" && y4 === \"negative\") CF = 1;\n\n    const total = PM + ROE + CF;\n\n    let grade = \"\";\n    if (total >= 90) grade = \"A\";\n    else if (total >= 70) grade = \"B\";\n    else if (total >= 50) grade = \"C\";\n    else if (total >= 30) grade = \"D\";\n    else grade = \"E\";\n\n    document.getElementById(\"result\").innerText =\n      `Profit Margin (PM) = ${PM} \u5206\\n` +\n      `Return on Equity (ROE) = ${ROE} \u5206\\n` +\n      `Cash Flow (CF) = ${CF} \u5206\\n` +\n      `\ud83d\udc49 Total Score = ${total} \u5206\\n` +\n      `\ud83d\udcca \u7b49\u7ea7\uff1a${grade} \u7ea7`;\n  }\n<\/script>\n\n\n\n<script>\n  function calculateScore() {\n    const y1 = parseFloat(document.getElementById(\"pm\").value);\n    const y2 = parseFloat(document.getElementById(\"roe\").value);\n    const y3 = document.getElementById(\"cashflowoperating\").value;\n    const y4 = document.getElementById(\"freecashflow\").value;\n\n    if (isNaN(y1) || isNaN(y2)) {\n      alert(\"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u6570\u503c\uff08\u652f\u6301\u5c0f\u6570\uff09\");\n      return;\n    }\n\n    let PM = 0;\n    if (y1 >= 1.0 && y1 <= 5.5) PM = 5;\n    else if (y1 >= 5.6 && y1 <= 10.5) PM = 10;\n    else if (y1 >= 10.6 && y1 <= 15.9) PM = 15;\n    else if (y1 >= 16.0) PM = 20;\n\n    let ROE = 0;\n    if (y2 >= 1.0 && y2 <= 5.5) ROE = 10;\n    else if (y2 >= 5.6 && y2 <= 10.5) ROE = 20;\n    else if (y2 >= 10.6 && y2 <= 15.9) ROE = 30;\n    else if (y2 >= 16.0) ROE = 40;\n\n    let CF = 0;\n    if (y3 === \"profit\" && y4 === \"positive\") CF = 40;\n    else if (y3 === \"profit\" && y4 === \"negative\") CF = 30;\n    else if (y3 === \"deficit\" && y4 === \"positive\") CF = 20;\n    else if (y3 === \"deficit\" && y4 === \"negative\") CF = 1;\n\n    const total = PM + ROE + CF;\n\n    let grade = \"\";\n    if (total >= 90) grade = \"A\";\n    else if (total >= 70) grade = \"B\";\n    else if (total >= 50) grade = \"C\";\n    else if (total >= 30) grade = \"D\";\n    else grade = \"E\";\n\n    document.getElementById(\"result\").innerText =\n      `Profit Margin (PM) = ${PM} \u5206\\n` +\n      `Return on Equity (ROE) = ${ROE} \u5206\\n` +\n      `Cash Flow (CF) = ${CF} \u5206\\n` +\n      `\ud83d\udc49 Total Score = ${total} \u5206\\n` +\n      `\ud83d\udcca \u7b49\u7ea7\uff1a${grade} \u7ea7`;\n  }\n<\/script>\n\n\n\n<style>\n  .prc-panel {\n    background: white;\n    padding: 20px;\n    border-radius: 12px;\n    max-width: 500px;\n    margin: 20px auto;\n    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);\n    font-family: Arial, sans-serif;\n  }\n  .prc-panel h2 {\n    color: #333;\n    margin-top: 0;\n    text-align: center;\n  }\n  .prc-panel label {\n    display: block;\n    margin-top: 12px;\n    font-weight: bold;\n  }\n  .prc-panel input,\n  .prc-panel select {\n    padding: 8px;\n    width: 100%;\n    margin-top: 5px;\n    border-radius: 6px;\n    border: 1px solid #ccc;\n    box-sizing: border-box;\n  }\n  .prc-panel button {\n    margin-top: 20px;\n    width: 100%;\n    padding: 12px;\n    font-size: 16px;\n    background-color: #0078d7;\n    color: white;\n    border: none;\n    border-radius: 6px;\n    cursor: pointer;\n  }\n  .prc-panel button:hover {\n    background-color: #005bb5;\n  }\n  .prc-result {\n    margin-top: 20px;\n    padding: 15px;\n    background-color: #f9f9f9;\n    border: 1px solid #ccc;\n    border-radius: 8px;\n    white-space: pre-line;\n    line-height: 1.6;\n    font-size: 15px;\n  }\n<\/style>\n\n<div class=\"prc-panel\">\n  <h2>PRC \u98ce\u9669\u68c0\u6d4b (Risk Check)<\/h2>\n\n  <label for=\"pm\">Profit Margin (%):<\/label>\n  <input type=\"number\" step=\"0.1\" id=\"pm\" placeholder=\"\u4f8b\u5982\uff1a15.0\">\n\n  <label for=\"roe\">Return On Equity (%):<\/label>\n  <input type=\"number\" step=\"0.1\" id=\"roe\" placeholder=\"\u4f8b\u5982\uff1a13.0\">\n\n  <label for=\"cashflowoperating\">Operating Cash Flow:<\/label>\n  <select id=\"cashflowoperating\">\n    <option value=\"surplus\">Surplus<\/option>\n    <option value=\"deficit\">Deficit<\/option>   \n  <\/select>\n\n  <label for=\"freecashflow\">Free Cash Flow:<\/label>\n  <select id=\"freecashflow\">\n    <option value=\"positive\">Positive<\/option>\n    <option value=\"negative\">Negative<\/option>   \n  <\/select>\n\n  <button onclick=\"calculateScore()\">\u8ba1\u7b97\u603b\u5206\u53ca\u8bc4\u7ea7<\/button>\n\n  <div id=\"result\" class=\"prc-result\"><\/div>\n<\/div>\n\n<script>\n  function calculateScore() {\n    const y1 = parseFloat(document.getElementById(\"pm\").value);\n    const y2 = parseFloat(document.getElementById(\"roe\").value);\n    const y3 = document.getElementById(\"cashflowoperating\").value;\n    const y4 = document.getElementById(\"freecashflow\").value;\n\n    if (isNaN(y1) || isNaN(y2)) {\n      alert(\"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u6570\u503c\uff08\u652f\u6301\u5c0f\u6570\uff09\");\n      return;\n    }\n\n    let PM = 0;\n    if (y1 >= 1.0 && y1 <= 5.5) PM = 5;\n    else if (y1 >= 5.6 && y1 <= 10.5) PM = 10;\n    else if (y1 >= 10.6 && y1 <= 15.9) PM = 15;\n    else if (y1 >= 16.0) PM = 20;\n\n    let ROE = 0;\n    if (y2 >= 1.0 && y2 <= 5.5) ROE = 10;\n    else if (y2 >= 5.6 && y2 <= 10.5) ROE = 20;\n    else if (y2 >= 10.6 && y2 <= 15.9) ROE = 30;\n    else if (y2 >= 16.0) ROE = 40;\n\n    let CF = 0;\n    if (y3 === \"surplus\" && y4 === \"positive\") CF = 40;\n    else if (y3 === \"surplus\" && y4 === \"negative\") CF = 30;\n    else if (y3 === \"deficit\" && y4 === \"positive\") CF = 20;\n    else if (y3 === \"deficit\" && y4 === \"negative\") CF = 1;\n\n    const total = PM + ROE + CF;\n\n    let grade = \"\";\n    if (total >= 90) grade = \"A\";\n    else if (total >= 70) grade = \"B\";\n    else if (total >= 50) grade = \"C\";\n    else if (total >= 30) grade = \"D\";\n    else grade = \"E\";\n\n    document.getElementById(\"result\").innerText =\n      `Profit Margin (PM) = ${PM} \u5206\\n` +\n      `Return on Equity (ROE) = ${ROE} \u5206\\n` +\n      `Cash Flow (CF) = ${CF} \u5206\\n` +\n      `\ud83d\udc49 Total Score = ${total} \u5206\\n` +\n      `\ud83d\udcca \u7b49\u7ea7\uff1a${grade} \u7ea7`;\n  }\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u3002\u3002\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-2860","post","type-post","status-publish","format-standard","hentry","category-01-"],"_links":{"self":[{"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=\/wp\/v2\/posts\/2860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2860"}],"version-history":[{"count":5,"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=\/wp\/v2\/posts\/2860\/revisions"}],"predecessor-version":[{"id":2883,"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=\/wp\/v2\/posts\/2860\/revisions\/2883"}],"wp:attachment":[{"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kampongkoh.com.au\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}