催单快速开启
// ==UserScript==
// @name 催单快速开启
// @namespace http://tampermonkey.net/
// @version 0.11
// @description try to take over the world!
// @author You
// @match https://superjx.superboss.cc/**
// @icon https://www.google.com/s2/favicons?sz=64&domain=superboss.cc
// @grant none
// ==/UserScript==
let Container = document.createElement('div');
Container.id = "sp-ac-container1";
Container.style.position = "fixed"
Container.style.left = "800px"
Container.style.top = "10px"
Container.style.border = "2px";
Container.style.width = "300px";
Container.style.borderRadius = "20px";
Container.innerHTML =`<input type="input" placeholder="输入需要开启几页" id="srk"><input type="button" value="一键开启" id="kaishi">`
if(document.location.href.indexOf("superjx.superboss.cc") !== -1){
console.log("已开启功能")
document.body.appendChild(Container);
kaishi.onclick=function(){
let 开启页数 = srk.value
if(开启页数==""){
开启页数 = 1
}
console.log(开启页数)
for(let t=0;t<开启页数;t++){
let shuliang = document.querySelector("#app > div > div.layout-module--content--divdw > div > div > div:nth-child(2) > div > div:nth-child(2) > div.ant-card-body > div > div > div > div > div > div > div > div > table > tbody").childElementCount
shuliang = shuliang+1
console.log("找到客户数量:"+(shuliang-1))
setTimeout(function() {
for(let i=1;i<shuliang;i++){
setTimeout(function() {
document.querySelector("#app > div > div.layout-module--content--divdw > div > div > div:nth-child(2) > div > div:nth-child(2) > div.ant-card-body > div > div > div > div > div > div > div > div > table > tbody > tr:nth-child("+i+") > td:nth-child(4) > span > span > a").click()
if(i==shuliang-1){
setTimeout(function() {console.log("当页点击结束")},100)
}
}, i*800);
}
if(t>0){
document.querySelector("#app > div > div.layout-module--content--divdw > div > div > div:nth-child(2) > div > div:nth-child(2) > div.ant-card-body > div > ul > li.ant-pagination-next").click()
}
console.log("已翻页次数"+t+"。间隔时间:"+t*(shuliang*800+800))
},t*(shuliang*800+800));
}
}
}