NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
这是一个 Tampermonkey 脚本,专为 ERP 系统的波次创建页面设计。当用户访问波次创建页面时,脚本会自动选中 SKU 列表中的全选复选框,提高用户操作效率,减少重复点击操作。
https://ww.erp321.com/app/wms/Wave/CreateOffPick.aspx*
//*[@id="cbx_all"] 全选复选框已自动选中全选复选框// 自动选择全选复选框的函数
function autoSelectAll() {
// 查找目标复选框
const checkbox = document.evaluate('//*[@id="cbx_all"]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (checkbox && checkbox.type === 'checkbox' && !checkbox.checked) {
checkbox.checked = true;
console.log('已自动选中全选复选框');
// 触发必要的事件,确保选中状态生效
checkbox.dispatchEvent(new Event('change', { bubbles: true }));
checkbox.dispatchEvent(new Event('click', { bubbles: true }));
}
}
window.addEventListener('load', autoSelectAll);MIT License
欢迎提交 Issue 或 Pull Request 来改进脚本功能。
作者:yiwaima
最后更新:2026-01-09
Rating: 0