首页
关于
友链
推荐
肥啾解析
百度一下
肥啾GPT
Search
1
宝塔面板登录 phpMyAdmin 提示服务器和客户端上指示的HTTPS之间不匹配
269 阅读
2
Customer complaints evolve with in-car tech
188 阅读
3
JavaScript解析
153 阅读
4
内连接,左连接,右连接作用及区别
111 阅读
5
所谓关系
109 阅读
默认分类
网游架设
手机游戏
python
PHP
Mysql
VBA
C++
JAVASCRIPT
javascript基础
Oracle
生产管理
计划控制
ERP系统开发
APS排产
MES研究
考勤系统
CPA
财管
实务
经济法
战略
审计
税法
藏书架
古典名著
世界名著
编程秘籍
攻防渗透
经管书籍
大佬传经
风雅读物
考试相关
心情格言
拾玉良言
外文报刊
外刊随选
Facebook
Twitter
China Daily
软考
登录
Search
标签搜索
期刊读物
古文
何瑜明
累计撰写
160
篇文章
累计收到
154
条评论
首页
栏目
默认分类
网游架设
手机游戏
python
PHP
Mysql
VBA
C++
JAVASCRIPT
javascript基础
Oracle
生产管理
计划控制
ERP系统开发
APS排产
MES研究
考勤系统
CPA
财管
实务
经济法
战略
审计
税法
藏书架
古典名著
世界名著
编程秘籍
攻防渗透
经管书籍
大佬传经
风雅读物
考试相关
心情格言
拾玉良言
外文报刊
外刊随选
Facebook
Twitter
China Daily
软考
页面
关于
友链
推荐
肥啾解析
百度一下
肥啾GPT
搜索到
26
篇与
的结果
2025-04-11
test
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>生产计划跟踪</title> <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet"> <style> .nav-tabs { border-bottom: 2px solid #0d6efd; } .tab-pane { padding: 20px 0; } .progress-bar { transition: width 0.3s ease; } input[type="number"] { max-width: 120px; } .card { box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .table-hover tbody tr:hover { background-color: #f8f9fa; } </style> </head> <body class="bg-light"> <div class="container py-4"> <!-- 产品汇总标签页 --> <h3 class="mb-4 text-primary">生产计划总览</h3> <nav> <div class="nav nav-tabs" id="nav-tab" role="tablist"> <?php $conn = new mysqli("localhost", "ytpmc", "ytpmc321", "ytpmc"); $parts = $conn->query("SELECT num, sum(sl),ht as total FROM `ordert` where ht='缠布' GROUP BY num"); $parts2 = $conn->query("SELECT num,part,sl,pbsj,zt,ht FROM `ordert` where ht='缠布'"); $first = true; while($row = $parts->fetch_assoc()) { // $active = $first ? 'active' : ''; echo '<button class="nav-link '.$active.'" data-bs-toggle="tab" data-bs-target="#part'.$row['num'].'" type="button"> '.$row['num'].' <span class="badge bg-primary">'.$row['total'].'</span> </button>'; $first = false; } ?> </div> </nav> <!-- 明细内容区域 --> <div class="tab-content mt-3" id="nav-tabContent"> <?php $parts2 = $conn->query("SELECT num,part,sl,pbsj,zt,ht FROM `ordert` where ht='缠布'"); $parts2->data_seek(0); while($part = $parts2->fetch_assoc()) { $active = $part === reset($parts2) ? 'show active' : ''; echo '<div class="tab-pane fade '.$active.'" id="part'.$part['num'].'"> <div class="card"> <div class="card-header bg-white"> <h5>'.$part['num'].' - 生产明细</h5> </div> <div class="card-body"> <table class="table table-hover"> <thead> <tr> <th>产品编号</th> <th>需求数量</th> <th>完成数量</th> <th>操作</th> </tr> </thead> <tbody>'; $sql = "SELECT id,part,sl,wc_sl,zt,ht FROM `ordert` WHERE ht='缠布' AND num='{$part['num']}'"; $details = $conn->query($sql); while($row = $details->fetch_assoc()) { echo '<tr> <td>'.$row['part'].'</td> <td>'.$row['sl'].'</td> <td> <input type="number" class="form-control complete-input" min="0" max="'.$row['sl'].'" value="'.$row['wc_sl'].'" '.($row['zt'] == 'wc' ? 'disabled' : '').'> </td> <td> <button class="btn btn-sm '.($row['zt'] == 'wc' ? 'btn-success' : 'btn-primary').' save-btn" data-num="'.$row['part'].'" '.($row['zt'] == 'wc' ? 'disabled' : '').'> '.($row['zt'] == 'wc' ? '已完成' : '保存').' </button> </td> </tr>'; } echo '</tbody></table></div></div></div>'; } ?> </div> </div> <script src="https://cdn.bootcdn.net/ajax/libs/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script> <script> document.querySelectorAll('.save-btn').forEach(btn => { btn.addEventListener('click', async function() { const num = this.dataset.num; const wc_sl = this.closest('tr').querySelector('.complete-input').value; try { const response = await fetch('update.php', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ num, wc_sl }) }); const result = await response.json(); if(result.success) { alert('保存成功!'); location.reload(); } else { alert('保存失败:' + result.message); } } catch(error) { console.error('Error:', error); } }); }); </script> </body> </html>
2025年04月11日
4 阅读
0 评论
0 点赞
2025-04-06
悬停隐藏URL
<a href="javascript:void(0);" onclick="redirectTo('https://example.com')">隐藏URL的链接</a> <script> function redirectTo(url) { window.location.href = url; } </script> 示例try { if (item.isHeader == "1") { str = "<li class='menu-header'>" + item.name + "</li>"; $(parent).append(str); if (item.childMenus != "") { initMenu(item.childMenus, parent); } } else { item.icon == "" ? item.icon = "" : item.icon = item.icon; if (item.childMenus == "") { // 修改普通菜单项的href为JavaScript伪协议,并用data-url存储真实地址 str = `<li><a href="javascript:void(0)" data-url="${item.url}"><i class='icon-font'>${item.icon}</i><span>${item.name}</span></a></li>`; $(parent).append(str); } else { // 父级菜单项移除真实href,保留点击功能用于展开 str = `<li><a href="javascript:void(0)"><i class='icon-font'>${item.icon}</i><span>${item.name}</span><i class='icon-font icon-right'></i></a> <ul class='menu-item-child' id='menu-child-${item.id}'></ul></li>`; $(parent).append(str); var childParent = $("#menu-child-" + item.id); initMenu(item.childMenus, childParent); } } } catch (e) { console.error(e); } // 在文档加载后绑定点击事件(放在代码末尾或单独脚本中) $(function() { // 普通菜单跳转逻辑 $('body').on('click', 'a[data-url]', function(e) { e.preventDefault(); window.location.href = $(this).data('url'); }); // 子菜单展开逻辑(根据现有功能补充,示例如下) $('body').on('click', 'li > a:has(+ .menu-item-child)', function(e) { e.preventDefault(); $(this).next('.menu-item-child').slideToggle(); }); });
2025年04月06日
3 阅读
0 评论
0 点赞
2025-04-03
自动排产实现
测试数据排产测试数据.xlsx分班测试.xlsx排产测试数据结果.xlsx排产逻辑:将缺件的产品先按缺件时间先后,再按数量从少到多的顺序进行排列,优先完成同一缺件时间的小批量订单。然后将无法完成的订单递延到第二天继续生产,仍然是优先完成同一缺件时间的小批量订单,检查排产日期是否超过交付时间,排产时间需要早交付时间一天,否则预警.考虑种类和难易程度对产量影响,建立内外嵌套循环,当种类超过阈值则自动终止,若未超过阈值则会排满
2025年04月03日
13 阅读
0 评论
0 点赞
2025-03-29
批量更新SQL语句
$placeholders = implode(',', array_fill(0, count($receivedOrderNumbers), '?')); $sql = "UPDATE orders SET zt = CASE WHEN order_number IN ($placeholders) THEN 'open' ELSE 'close' END"; 快速模式 回答完成 这段代码的目的是生成一个 UPDATE SQL 查询,根据 order_number 的值动态更新 zt 字段为 'open' 或 'close'。以下是代码的详细解析和注意事项: 代码解析: $placeholders = implode(',', array_fill(0, count($receivedOrderNumbers), '?')): 生成一个包含 ? 占位符的字符串,占位符的数量与 $receivedOrderNumbers 数组的长度一致。 例如,如果 $receivedOrderNumbers 有 3 个元素,$placeholders 的值将是 '?,?,?'。 $sql = "UPDATE orders SET zt = CASE WHEN order_number IN ($placeholders) THEN 'open' ELSE 'close' END": 构建一个 UPDATE 查询,使用 CASE 语句动态更新 zt 字段。 如果 order_number 在 $receivedOrderNumbers 中,则将 zt 设置为 'open',否则设置为 'close'。 生成的 SQL 示例: 假设 $receivedOrderNumbers 是 [101, 102, 103],生成的 SQL 查询将是: sql Copy Code UPDATE orders SET zt = CASE WHEN order_number IN (?, ?, ?) THEN 'open' ELSE 'close' END 使用场景: 这段代码适用于批量更新数据库中某个字段的值,根据条件动态设置不同的值。例如: 将特定订单的状态更新为 'open',其他订单的状态更新为 'close'。 注意事项: 参数绑定: 使用 ? 占位符时,必须将 $receivedOrderNumbers 的值作为参数绑定到查询中,以避免 SQL 注入风险。 示例(使用 PDO): php Copy Code $stmt = $pdo->prepare($sql); $stmt->execute($receivedOrderNumbers); ELSE 的作用: 如果没有 ELSE,所有不满足 WHEN 条件的记录将不会被更新。 如果希望未匹配的记录保持原值,可以移除 ELSE 'close'。 性能问题: 如果 $receivedOrderNumbers 包含大量元素,生成的 SQL 可能会很长,影响性能。 可以考虑分批更新或优化查询逻辑。 改进建议: 如果只需要更新匹配的记录,可以简化查询: php Copy Code $placeholders = implode(',', array_fill(0, count($receivedOrderNumbers), '?')); $sql = "UPDATE orders SET zt = 'open' WHERE order_number IN ($placeholders)"; 这样只会更新 order_number 在 $receivedOrderNumbers 中的记录,其他记录不会被修改。
2025年03月29日
4 阅读
0 评论
0 点赞
2024-04-16
Climate change could affect timekeeping, study says
{mp3 name="听力" url="http://v-hls.chinadaily.com.cn/stream/607212/903f9e1b-f05d-485d-b69c-e37ae16606b4/571fde86-381d-4d12-8cf6-bc045c95a981.mp3" cover="https://img2.chinadaily.com.cn/images/202404/08/66139dd2a31082fc2b6bcb5b.jpeg" theme="#f0ad4e" autoplay="autoplay"/}Climate change is affecting the speed of the Earth's rotation and could impact how we keep time, a study says.一项研究称,气候变化正在影响地球的自转速度,并可能影响人类的计时方式。"Global warming is already affecting global timekeeping," says the study, published in the journal Nature.这项发表在《自然》(Nature)杂志上的研究指出:"全球变暖已经在影响全球计时。"Coordinated Universal Time (UTC) - which is used by most of the world to regulate clocks and time - is calculated by the Earth's rotation."协调世界时"(UTC)是根据地球自转计算出来的,世界上大多数国家都用它来管理时钟和时间。But the Earth's rotation rate is not constant and can therefore have an effect on how long our days and nights are.但地球的自转速度并不是恒定的,因此会对我们的昼夜长短产生影响。Changes to the planet's liquid core have meant the Earth has been spinning slightly quicker.地球液态内核的变化意味着地球自转速度略快。Since the 1970s, to correct for this, about 27 leap seconds have been added to the global clock, with timekeepers planning on subtracting a second for the first time in 2026. This is known as a "negative leap second."自 20 世纪 70 年代以来,为了纠正这一现象,全球时钟已经增加了约 27 个闰秒,计时员计划将在 2026 年首次减少一秒。这被称为 "负闰秒"。However, the study finds that ice melting caused by climate change has partly offset that acceleration.然而,研究发现,气候变化导致的冰雪融化部分抵消了这一加速。Ice sheets are now losing mass five times faster than they were 30 years ago, meaning that the negative leap second change will not be needed until 2029, the study suggests.研究表明,冰盖现在的质量损失速度是30年前的5倍,这意味着可能直到2029年才需要负闰秒的变化。"It's kind of impressive, even to me, we've done something that measurably changes how fast the Earth rotates," Duncan Agnew, the author of the study, told NBC News.这项研究的作者邓肯•阿格纽告诉美国全国广播公司新闻(NBC News):"即使对我来说,我们已经做了一些可以适度地改变地球旋转速度的事情,这也是令人印象深刻的。""Things are happening that are unprecedented.""正在发生的事情是前所未有的。"The negative leap second has never been used before and, according to the study, its use "will pose an unprecedented problem" for computer systems across the world.负闰秒以前从未使用过,根据这项研究,负闰秒的使用将给全球计算机系统 "带来前所未有的问题"。"This has never happened before, and poses a major challenge to making sure that all parts of the global timing infrastructure show the same time," Mr Agnew, who is a researcher at the University of California, San Diego told AFP news agency.加利福尼亚大学圣迭戈分校的研究员阿格纽先生告诉法新社记者:"这种情况以前从未发生过,这对确保全球计时基础设施的所有部分都显示相同的时间构成了重大挑战。""Many computer programs for leap seconds assume they are all positive, so these would have to be rewritten," he added.他补充说:"许多计算闰秒的计算机程序都假定它们都是正数,因此这些程序必须重写。"There has been some skepticism of the study, however.然而,也有一些人对这项研究持怀疑态度。Demetrios Matsakis, former chief scientist for time services at the US Naval Observatory, told AFP that "Earth is too unpredictable to be sure" if a negative leap second would be needed any time soon.美国海军天文台负责时间服务的前首席科学家德米特里奥斯•马萨基斯告诉法新社说,"地球太不可预测了,无法确定是否在不久的将来就需要负闰秒。"Human activities like burning fossil fuels are causing world temperatures to rise.燃烧化石燃料等人类活动正在导致全球气温上升。That temperature rise is having a huge effect on the environment, including the rapid melting of glaciers and ice sheets.气温上升对环境产生了巨大影响,包括冰川和冰盖的迅速融化。
2024年04月16日
7 阅读
0 评论
0 点赞
1
...
3
4
5
6
0:00