Server : nginx/1.20.2 System : Linux VM-4-4-centos 3.10.0-1160.66.1.el7.x86_64 #1 SMP Wed May 18 16:02:34 UTC 2022 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/greatapp.cn/public/baojia/ |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>招标代理费</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- <link rel="stylesheet" href="./style.css"> --> <style type="text/css"> body { align-items: center; background-color: #000; display: flex; justify-content: center; height: 100vh; } .form { background-color: #15172b; border-radius: 20px; box-sizing: border-box; height: 90%; padding: 20px; width: 90%; } .title { color: #eee; font-family: sans-serif; font-size: 36px; font-weight: 600; margin-top: 30px; } .subtitle { color: #eee; font-family: sans-serif; font-size: 16px; font-weight: 600; margin-top: 10px; } .input-container { height: 50px; position: relative; width: 100%; } .ic1 { margin-top: 40px; } .ic2 { margin-top: 30px; } .input { background-color: #303245; border-radius: 12px; border: 0; box-sizing: border-box; color: #eee; font-size: 18px; height: 100%; outline: 0; padding: 4px 20px 0; width: 100%; } .cut { background-color: #15172b; border-radius: 10px; height: 20px; left: 20px; position: absolute; top: -20px; transform: translateY(0); transition: transform 200ms; width: 76px; } .cut-short { width: 50px; } .input:focus ~ .cut, .input:not(:placeholder-shown) ~ .cut { transform: translateY(8px); } .placeholder { color: #65657b; font-family: sans-serif; left: 20px; line-height: 14px; pointer-events: none; position: absolute; transform-origin: 0 50%; transition: transform 200ms, color 200ms; top: 20px; } .input:focus ~ .placeholder, .input:not(:placeholder-shown) ~ .placeholder { transform: translateY(-30px) translateX(10px) scale(0.75); } .input:not(:placeholder-shown) ~ .placeholder { color: #808097; } .input:focus ~ .placeholder { color: #dc2f55; } .submit { background-color: #08d; border-radius: 12px; border: 0; box-sizing: border-box; color: #eee; cursor: pointer; font-size: 18px; height: 50px; margin-top: 38px; // outline: 0; text-align: center; width: 100%; } .submit:active { background-color: #06b; } </style> </head> <body> <div class="form"> <div class="title">招标代理费计算</div> <div class="subtitle">仅供参考</div> <div class="input-container ic1"> <input id="total" class="input" type="text" placeholder=" " /> <div class="cut"></div> <label for="total" class="placeholder" >总金额(万)</label> </div> <div class="input-container ic2" style="height: 80px"> <textarea id="detail" class="input" type="text" placeholder=" "> </textarea> <div class="cut"></div> <label for="detail" class="placeholder">计算明细</label> </div> <div class="input-container ic2"> <input id="result" class="input" type="text" placeholder=" " /> <div class="cut cut-short"></div> <label class="placeholder">总费用</> </div> <button type="button" class="submit" onclick="jisuan()">计算</button> </div> <script type="text/javascript"> function jisuan(){ var resultObj=document.getElementById('result'); var totalObj=document.getElementById('total'); var total=eval(totalObj.value); var result = 0; var stepValue = ""; var part = 0; var result1=0; var result2=0; var result3=0; var result4=0; var result5=0; if (total > 10000) { alert("金额太大了!"); return; } part = total; if (part > 5000) { part = part - 5000; result1 = eval(part*0.0025); stepValue += "(5000-10000)"+part+"×0.25%="+result1; part = 5000; } if (part>1000) { part = part - 1000; result2 = eval(part*0.004); stepValue += "(1000-5000)"+part+"×0.4%="+result2; part = 1000; } if (part>500) { part = part - 500; result3 = eval(part*0.007); stepValue += "(500-1000)"+part+"×0.7%="+result3; part = 500; } if (part>100) { part = part - 100; result4 = eval(part*0.01); stepValue += "(100-500)"+part+"×1%="+result4+"\r\n"; part = 100; } if (part > 0) { result5 = eval(part*0.012); stepValue += "(0-100)"+part+"×1.2%="+result5; } resultObj.value=result1+result2+result3+result4+result5; document.getElementById("detail").innerHTML = stepValue; } </script> </body> </html>