12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>一键刷单</title>
- <style>
- body {
- font-family: Arial, sans-serif;
- text-align: center;
- margin: 50px;
- background-color: #f4f4f4;
- }
- button {
- padding: 10px 20px;
- font-size: 16px;
- color: white;
- background-color: #007bff;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- transition: background-color 0.3s;
- margin:0 20px;
- }
- button:hover {
- background-color: #0056b3;
- }
- .button-link {
- text-decoration: none; /* Remove underline from links */
- }
- #orderCount {
- margin-top: 20px;
- font-size: 18px;
- color: #333;
- }
- .tip {
- margin-bottom: 40px;
- color: red;
- }
- </style>
- <script>
- function completeOrders() {
- // 二次确认
- if (confirm("您确定要完成工单吗?")) {
- // 这里使用 AJAX 模拟调用
- fetch('/runJobOrder', {
- method: 'POST' // 或者根据实际情况使用 'GET'
- })
- .then(response => {
- if (!response.ok) {
- throw new Error('网络响应不是 OK'); // 如果响应状态不是 2xx, 抛出错误
- }
- return response.json(); // 返回解析后的 JSON 数据,或者进一步处理错误状态
- })
- .then(data => {
- document.getElementById('orderCount').innerText = `本次共刷 ${data.order_count} 笔工单`;
- })
- .catch(error => {
- console.error('Error:', error);
- document.getElementById('orderCount').innerText = '请求失败,请稍后再试';
- });
- }
- }
- </script>
- </head>
- <body>
- <div class="tip">注意:如果您是双驰内部网络用户,请通过内网地址进行打标。外部用户请使用外网地址打标。</div>
- <button onclick="completeOrders()">一键完成工单</button>
- <a href="http://192.168.40.101:40102/pda/index.jsp" target="_blank" class="button-link">
- <button style="background-color: #46B39D">内网打标地址</button>
- </a>
- <a href="http://120.33.205.42:40102/pda/index.jsp" target="_blank" class="button-link">
- <button style="background-color: #004175">外网打标地址</button>
- </a>
- <div id="orderCount"></div>
- </body>
- </html>
|