DFDJLAdjfldjg

you can use it for your report

目前为 2024-04-27 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.gf.qytechs.cn/scripts/493430/1367270/DFDJLAdjfldjg.js

  1. (function () {
  2. "use strict";
  3. //预处理
  4. //预处理
  5. //预处理
  6. if (1) {
  7. // 保存原始的XMLHttpRequest.send方法
  8. var origSend = XMLHttpRequest.prototype.send;
  9.  
  10. // 覆盖原始的send方法
  11. XMLHttpRequest.prototype.send = function (body) {
  12. if (
  13. this._url.includes(
  14. "http://111.51.123.233:8088/intf/report/itemJson/save"
  15. )
  16. ) {
  17. // 检查URL,确保它是你想要拦截的
  18. //console.log('Sent data:', body);
  19. //start
  20. // 解析数据
  21. try {
  22. const parsedData = parseCustomUrlEncodedData(body);
  23. //console.log('结构化:',parsedData);
  24. //XiaoHe(parsedData);
  25. } catch (error) {
  26. console.error("解析数据时发生错误:", error);
  27. }
  28.  
  29. //end
  30. // var data = JSON.parse(body);
  31.  
  32. // 你可以在这里添加更多的逻辑来处理捕获的数据
  33. }
  34. // 调用原始的send方法
  35. origSend.call(this, body);
  36. };
  37.  
  38. // 覆盖原始的XMLHttpRequest.open方法来捕获请求的URL
  39. var origOpen = XMLHttpRequest.prototype.open;
  40. XMLHttpRequest.prototype.open = function (method, url) {
  41. this._url = url; // 将URL附加到XHR对象上,以便后续使用
  42. origOpen.apply(this, arguments);
  43. };
  44.  
  45. var button = document.createElement("button");
  46. button.innerText = "审核系统";
  47. button.title = "点击进行审核"; // 添加一个提示,当鼠标悬停在按钮上时显示
  48. button.style.position = "fixed"; // 使用 fixed 定位以便按钮始终停留在视口内
  49. button.style.right = window.innerWidth / 15 + "px"; // 距离视口右边四分之一窗口宽度
  50. button.style.bottom = window.innerHeight / 15 + "px"; // 距离视口底部四分之一窗口高度
  51. button.style.cursor = "grab"; // 更改鼠标样式,表示可以拖动
  52. // 添加样式
  53. button.style.fontSize = "16px"; // 字体大小
  54. button.style.color = "#ffffff"; // 字体颜色
  55. button.style.backgroundColor = "#add8e6"; // 背景颜色
  56. button.style.border = "none"; // 无边框
  57. button.style.borderRadius = "5px"; // 边框圆角
  58. button.style.padding = "10px 20px"; // 内边距
  59. button.style.transition = "background-color 0.3s ease"; // 背景色过渡效果
  60. // 可选:添加鼠标悬停效果
  61. button.onmouseover = function () {
  62. this.style.backgroundColor = "#87CEEB"; // 鼠标悬停时背景色稍深一些
  63. };
  64. button.onmouseout = function () {
  65. this.style.backgroundColor = "#add8e6"; // 鼠标离开时恢复为原来的浅蓝色
  66. };
  67.  
  68. // 初始化拖动逻辑
  69. var initialX, initialY;
  70. var isDragging = false;
  71.  
  72. button.onmousedown = function (e) {
  73. initialX = e.clientX - button.getBoundingClientRect().right;
  74. initialY = e.clientY - button.getBoundingClientRect().bottom;
  75. isDragging = true;
  76.  
  77. document.onmousemove = function (e) {
  78. if (!isDragging) return;
  79. var newX = e.clientX - initialX;
  80. var newY = e.clientY - initialY;
  81. button.style.right = window.innerWidth - newX + "px";
  82. button.style.bottom = window.innerHeight - newY + "px";
  83. };
  84.  
  85. document.onmouseup = function () {
  86. isDragging = false;
  87. document.onmousemove = null;
  88. document.onmouseup = null;
  89. };
  90.  
  91. e.preventDefault();
  92. return false;
  93. };
  94.  
  95. // 拖动函数
  96. function drag(e) {
  97. if (!isDragging) return;
  98. // 计算按钮的新位置
  99. var newX = e.clientX - initialX;
  100. var newY = e.clientY - initialY;
  101.  
  102. // 应用新的位置
  103. button.style.left = newX + "px";
  104. button.style.top = newY + "px";
  105.  
  106. // 阻止默认事件和冒泡
  107. e.preventDefault();
  108. return false;
  109. }
  110.  
  111. // 停止拖动函数
  112. function stopDragging() {
  113. // 取消全局的mousemove和mouseup事件绑定
  114. document.onmousemove = null;
  115. document.onmouseup = null;
  116. // 标记为不再拖动
  117. isDragging = false;
  118. }
  119.  
  120. // 初始化按钮样式
  121. Object.assign(button.style, {
  122. fontSize: "16px",
  123. zIndex: 1000,
  124. borderRadius: "50%",
  125. backgroundColor: "#FF8C00",
  126. boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.2)",
  127. padding: "15px 32px",
  128. cursor: "grab",
  129. transition: "all 0.3s ease",
  130. outline: "none",
  131. border: "none",
  132. color: "white",
  133. textTransform: "uppercase",
  134. fontWeight: "bold",
  135. });
  136.  
  137. // 将按钮添加到文档中
  138. document.body.appendChild(button);
  139. button.onclick = function (e) {
  140. main();
  141. };
  142. //拖动
  143. if (1) {
  144. //不能拖动,能编辑
  145. if (1) {
  146. /* var input = document.createElement("TEXTAREA");
  147.  
  148. input.id = "information";
  149. input.name = "information";
  150.  
  151. // 设置基本样式
  152. input.style.width = "320px";
  153. input.style.height = "400px";
  154. input.style.resize = "none"; // 禁止用户调整大小
  155.  
  156. // 使用 Object.assign 一次性设置多个样式
  157. Object.assign(input.style, {
  158. position: "fixed",
  159. right: "20px", // 稍微靠右一些
  160. bottom: "20px", // 稍微靠下一些
  161. fontSize: "16px",
  162. zIndex: 100, // 确保它显示在其它元素之上
  163. border: "2px solid #ccc", // 添加边框
  164. borderRadius: "10px", // 使用更平滑的圆角
  165. backgroundColor: "white",
  166. padding: "10px", // 增加内边距
  167. boxShadow: "0 0 5px rgba(0, 0, 0, 0.1)", // 添加阴影
  168. cursor: "text", // 对于文本区域,使用 'text' 光标更合适
  169. overflow: "auto", // 当内容超出时显示滚动条
  170. });
  171.  
  172. document.body.appendChild(input); */
  173. }
  174.  
  175. //可以随意拖动,但不能编辑
  176. if (1) {
  177. /* var input = document.createElement("TEXTAREA");
  178.  
  179. input.id = "information";
  180. input.name = "information";
  181.  
  182. // 设置基本样式
  183. input.style.width = "320px";
  184. input.style.height = "400px";
  185. input.style.resize = "none"; // 禁止用户调整大小
  186. input.style.position = "absolute"; // 初始时使用绝对定位
  187. input.style.left = window.innerWidth / 15 + "px";; // 初始时靠左
  188. input.style.bottom = window.innerWidth / 15 + "px";; // 初始时靠下
  189. input.style.zIndex = 100; // 确保它显示在其它元素之上
  190.  
  191. // 添加拖动逻辑
  192. var isDragging1 = false;
  193. var initialX1, initialY1;
  194.  
  195. input.onmousedown = function (e) {
  196. // 阻止默认的文本选择行为
  197. e.preventDefault();
  198.  
  199. // 记录鼠标按下时的位置
  200. initialX1 = e.clientX - input.offsetLeft;
  201. initialY1 = e.clientY - input.offsetTop;
  202.  
  203. // 标记为正在拖动
  204. isDragging1 = true;
  205.  
  206. // 绑定鼠标移动和释放事件
  207. document.onmousemove = drag1;
  208. document.onmouseup = stopDrag1;
  209. };
  210.  
  211. function drag1(e) {
  212. if (!isDragging1) return;
  213.  
  214. // 计算新的位置
  215. var newX = e.clientX - initialX1;
  216. var newY = e.clientY - initialY1;
  217.  
  218. // 限制textarea不超出视口
  219. if (newX < 0) newX = 0;
  220. if (newY < 0) newY = 0;
  221. if (newX > window.innerWidth - input.offsetWidth)
  222. newX = window.innerWidth - input.offsetWidth;
  223. if (newY > window.innerHeight - input.offsetHeight)
  224. newY = window.innerHeight - input.offsetHeight;
  225.  
  226. // 更新textarea的位置
  227. input.style.left = newX + "px";
  228. input.style.top = newY + "px";
  229. }
  230.  
  231. function stopDrag1() {
  232. // 标记为不再拖动
  233. isDragging1 = false;
  234.  
  235. // 移除鼠标移动和释放事件的绑定
  236. document.onmousemove = null;
  237. document.onmouseup = null;
  238. }
  239.  
  240. // 将textarea添加到文档中
  241. document.body.appendChild(input);
  242.  
  243. // 设置textarea的美观样式
  244. Object.assign(input.style, {
  245. border: "2px solid #ccc", // 添加边框
  246. borderRadius: "10px", // 使用更平滑的圆角
  247. backgroundColor: "white",
  248. padding: "10px", // 增加内边距
  249. boxShadow: "0 0 5px rgba(0, 0, 0, 0.1)", // 添加阴影
  250. fontSize: "16px",
  251. overflow: "auto", // 当内容超出时显示滚动条
  252. }); */
  253. }
  254.  
  255. //只能左右拖动可编辑
  256. if (1) {
  257. /* var input = document.createElement("TEXTAREA");
  258.  
  259. input.id = "information";
  260. input.name = "information";
  261.  
  262. // 设置基本样式
  263. input.style.width = "320px";
  264. input.style.height = "400px";
  265. input.style.resize = "none"; // 禁止用户调整大小
  266. input.style.position = "absolute"; // 初始时使用绝对定位
  267. input.style.left = "0"; // 初始时靠左
  268. input.style.bottom = "0"; // 初始时靠下
  269. input.style.zIndex = 100; // 确保它显示在其它元素之上
  270.  
  271. // 标记拖动状态
  272. var isDragging1 = false;
  273. var initialX1, initialY1;
  274.  
  275. // 右键按下时开始拖动
  276. input.onmousedown = function (e) {
  277. if (e.button === 2) {
  278. // 右键
  279. e.preventDefault(); // 阻止默认行为
  280.  
  281. // 记录鼠标按下时的位置
  282. initialX1 = e.clientX - parseInt(input.style.left, 10);
  283. initialY1 = e.clientY - parseInt(input.style.top, 10);
  284.  
  285. // 标记为正在拖动
  286. isDragging1 = true;
  287.  
  288. // 绑定鼠标移动和释放事件
  289. document.onmousemove = drag1;
  290. document.onmouseup = stopDrag1;
  291. }
  292. };
  293.  
  294. // 鼠标移动时拖动textarea
  295. function drag1(e) {
  296. if (!isDragging1) return;
  297.  
  298. // 计算新的位置
  299. var newX = e.clientX - initialX1;
  300. var newY = e.clientY - initialY1;
  301.  
  302. // 限制textarea不超出视口
  303. newX = Math.max(0, Math.min(newX, window.innerWidth - input.offsetWidth));
  304. newY = Math.max(
  305. 0,
  306. Math.min(newY, window.innerHeight - input.offsetHeight)
  307. );
  308.  
  309. // 更新textarea的位置
  310. input.style.left = newX + "px";
  311. input.style.top = newY + "px";
  312. }
  313.  
  314. // 停止拖动
  315. function stopDrag1() {
  316. // 标记为不再拖动
  317. isDragging1 = false;
  318.  
  319. // 移除鼠标移动和释放事件的绑定
  320. document.onmousemove = null;
  321. document.onmouseup = null;
  322. }
  323.  
  324. // 将textarea添加到文档中
  325. document.body.appendChild(input);
  326.  
  327. // 设置textarea的美观样式
  328. Object.assign(input.style, {
  329. border: "2px solid #ccc", // 添加边框
  330. borderRadius: "10px", // 使用更平滑的圆角
  331. backgroundColor: "white",
  332. padding: "10px", // 增加内边距
  333. boxShadow: "0 0 5px rgba(0, 0, 0, 0.1)", // 添加阴影
  334. fontSize: "16px",
  335. overflow: "auto", // 当内容超出时显示滚动条
  336. }); */
  337. }
  338. //随意拖动,可编辑,不可以动态调整大小
  339. if (1) {
  340. var input = document.createElement("TEXTAREA");
  341.  
  342. input.id = "information";
  343. input.name = "information";
  344.  
  345. // 设置基本样式
  346. input.style.width = "320px";
  347. input.style.height = "400px";
  348. input.style.resize = "none"; // 禁止用户调整大小
  349. input.style.position = "absolute"; // 初始时使用绝对定位
  350. input.style.left = window.innerWidth / 15 + "px"; // 初始时靠左
  351. input.style.top = window.innerWidth / 4 + "px"; // 初始时靠上
  352. input.style.zIndex = 100; // 确保它显示在其它元素之上
  353. input.style.backgroundColor = "#add8e6"; // 浅蓝色背景
  354. // 可选:添加鼠标悬停效果
  355. input.onmouseover = function () {
  356. this.style.backgroundColor = "#87CEEB"; // 鼠标悬停时背景色稍深一些
  357. };
  358. input.onmouseout = function () {
  359. this.style.backgroundColor = "#add8e6"; // 鼠标离开时恢复为原来的浅蓝色
  360. };
  361.  
  362. // 标记拖动状态
  363. var isDragging1 = false;
  364. var initialX1, initialY1;
  365. var offsetX1, offsetY1; // 用于记录鼠标相对于textarea的偏移量
  366.  
  367. // 右键按下时开始拖动
  368. input.onmousedown = function (e) {
  369. if (e.button === 2) {
  370. // 右键
  371. e.preventDefault(); // 阻止默认行为
  372.  
  373. // 记录鼠标按下时的位置
  374. initialX1 = e.clientX - parseInt(input.style.left, 10);
  375. initialY1 = e.clientY - parseInt(input.style.top, 10);
  376.  
  377. // 记录鼠标相对于textarea的偏移量
  378. offsetX1 = e.clientX - input.offsetLeft;
  379. offsetY1 = e.clientY - input.offsetTop;
  380.  
  381. // 标记为正在拖动
  382. isDragging1 = true;
  383.  
  384. // 绑定鼠标移动和释放事件
  385. document.onmousemove = drag1;
  386. document.onmouseup = stopDrag1;
  387. }
  388. };
  389.  
  390. // 鼠标移动时拖动textarea
  391. function drag1(e) {
  392. if (!isDragging1) return;
  393.  
  394. // 计算新的位置
  395. var newX = e.clientX - offsetX1;
  396. var newY = e.clientY - offsetY1;
  397.  
  398. // 限制textarea不超出视口
  399. newX = Math.max(
  400. 0,
  401. Math.min(newX, window.innerWidth - input.offsetWidth)
  402. );
  403. newY = Math.max(
  404. 0,
  405. Math.min(newY, window.innerHeight - input.offsetHeight)
  406. );
  407.  
  408. // 更新textarea的位置
  409. input.style.left = newX + "px";
  410. input.style.top = newY + "px";
  411. }
  412.  
  413. // 停止拖动
  414. function stopDrag1() {
  415. // 标记为不再拖动
  416. isDragging1 = false;
  417.  
  418. // 移除鼠标移动和释放事件的绑定
  419. document.onmousemove = null;
  420. document.onmouseup = null;
  421. }
  422.  
  423. // 将textarea添加到文档中
  424. document.body.appendChild(input);
  425.  
  426. // 设置textarea的美观样式
  427. Object.assign(input.style, {
  428. border: "2px solid #ccc", // 添加边框
  429. borderRadius: "10px", // 使用更平滑的圆角
  430. backgroundColor: "white",
  431. padding: "10px", // 增加内边距
  432. boxShadow: "0 0 5px rgba(0, 0, 0, 0.1)", // 添加阴影
  433. fontSize: "16px",
  434. overflow: "auto", // 当内容超出时显示滚动条
  435. });
  436. }
  437. }
  438.  
  439. function parseCustomUrlEncodedData(dataString) {
  440. const parts = dataString.split("&");
  441. const objects = [];
  442.  
  443. parts.forEach((part) => {
  444. const [key, encodedValue] = part.split("=");
  445. const decodedValue = decodeURIComponent(encodedValue);
  446. const parsedValue = JSON.parse(decodedValue);
  447. objects.push(parsedValue);
  448. });
  449. let mergedObject = {};
  450.  
  451. objects.forEach((obj) => {
  452. Object.assign(mergedObject, obj);
  453. });
  454. return mergedObject;
  455. }
  456. }
  457. var strtip = "";
  458. var tipnum = 0;
  459. var enable = true;
  460. var strinput = "";
  461. var strreport = "报告模板:\n";
  462. const keyname = [
  463. "JYJG1_JYJL1",
  464. "DTBZ1",
  465. "JYJG2_JYJL1",
  466. "DTBZ2",
  467. "JYJG3_JYJL1",
  468. "DTBZ3",
  469. "JYJG4_JYJL2",
  470. "DTBZ4",
  471. "JYJG5_JYJL2",
  472. "DTBZ5",
  473. "JYJG6_JYJL3",
  474. "DTBZ6",
  475. "JYJG7_JYJL4",
  476. "DTBZ7",
  477. "JYJG8_JYJL4",
  478. "DTBZ8",
  479. "JYJG9_JYJL4",
  480. "DTBZ9",
  481. "JYJG10_JYJL4",
  482. "DTBZ10",
  483. "JYJG11_JYJL5",
  484. "DTBZ11",
  485. "JYJG12_JYJL6",
  486. "DTBZ12",
  487. "JYJG13_JYJL6",
  488. "DTBZ13",
  489. "JYJG14_JYJL6",
  490. "DTBZ14",
  491. "JYJG15_JYJL6",
  492. "DTBZ15",
  493. "JYJG16_JYJL7",
  494. "DTBZ16",
  495. "JYJG17_JYJL8",
  496. "DTBZ17",
  497. "JYJG18_JYJL8",
  498. "DTBZ18",
  499. "JYJG19_JYJL9",
  500. "DTBZ19",
  501. "JYJG20_JYJL10",
  502. "DTBZ20",
  503. "JYJG21_JYJL11",
  504. "DTBZ21",
  505. "JYJG22_JYJL12",
  506. "DTBZ22",
  507. "JYJG23_JYJL12",
  508. "DTBZ23",
  509. "JYJG24_JYJL12",
  510. "DTBZ24",
  511. "JYJG25_JYJL13",
  512. "DTBZ25",
  513. "JYJG26_JYJL13",
  514. "DTBZ26",
  515. "JYJG27_JYJL13",
  516. "DTBZ27",
  517. "JYJG28_JYJL13",
  518. "DTBZ28",
  519. "JYJG29_JYJL13",
  520. "DTBZ29",
  521. "JYJG30_JYJL14",
  522. "DTBZ30",
  523. "JYJG31_JYJL14",
  524. "DTBZ31",
  525. "JYJG32_JYJL15",
  526. "DTBZ32",
  527. "JYJG33_JYJL15",
  528. "DTBZ33",
  529. "JYJG34_JYJL15",
  530. "DTBZ34",
  531. "JYJG35_JYJL16",
  532. "DTBZ35",
  533. "JYJG36_JYJL17",
  534. "DTBZ36",
  535. "JYJG37_JYJL18",
  536. "DTBZ37",
  537. "JYJG38_JYJL18",
  538. "DTBZ38",
  539. "JYJG39_JYJL18",
  540. "DTBZ39",
  541. "JYJG40_JYJL18",
  542. "DTBZ40",
  543. "JYJG41_JYJL19",
  544. "DTBZ41",
  545. "JYJG42_JYJL20",
  546. "DTBZ42",
  547. "JYJG43_JYJL21",
  548. "DTBZ43",
  549. "JYJG44_JYJL21",
  550. "DTBZ44",
  551. "JYJG45_JYJL21",
  552. "DTBZ45",
  553. "JYJG46_JYJL21",
  554. "DTBZ46",
  555. "JYJG47_JYJL22",
  556. "DTBZ47",
  557. "JYJG48_JYJL22",
  558. "DTBZ48",
  559. "JYJG49_JYJL23",
  560. "DTBZ49",
  561. "DTSJ503",
  562. "JYJG50_JYJL24",
  563. "DTBZ50",
  564. "DTSJ504",
  565. "JYJG51_JYJL24",
  566. "DTBZ51",
  567. "JYJG52_JYJL25",
  568. "DTBZ52",
  569. "JYJG53_JYJL26",
  570. "DTBZ53",
  571. "JYJG54_JYJL26",
  572. "DTBZ54",
  573. "JYJG55_JYJL26",
  574. "DTBZ55",
  575. "JYJG56_JYJL27",
  576. "DTBZ56",
  577. "JYJG57_JYJL27",
  578. "DTBZ57",
  579. "JYJG58_JYJL28",
  580. "DTBZ58",
  581. "JYJG59_JYJL28",
  582. "DTBZ59",
  583. "JYJG60_JYJL29",
  584. "DTBZ60",
  585. "DTSJ700",
  586. "JYJG61_JYJL29",
  587. "DTBZ61",
  588. "JYJG62_JYJL29",
  589. "DTBZ62",
  590. "JYJG63_JYJL29",
  591. "DTBZ63",
  592. "JYJG64_JYJL30",
  593. "DTBZ64",
  594. "JYJG65_JYJL30",
  595. "DTBZ65",
  596. "JYJG66_JYJL30",
  597. "DTBZ66",
  598. "DTSJ702",
  599. "JYJG67_JYJL31",
  600. "DTBZ67",
  601. "DTSJ74",
  602. "JYJG68_JYJL31",
  603. "DTBZ68",
  604. "JYJG69_JYJL32",
  605. "DTBZ69",
  606. "JYJG70_JYJL33",
  607. "DTBZ70",
  608. "JYJG71_JYJL33",
  609. "DTBZ71",
  610. "JYJG72_JYJL34",
  611. "DTBZ72",
  612. "JYJG73_JYJL34",
  613. "DTBZ73",
  614. "JYJG74_JYJL34",
  615. "DTBZ74",
  616. "JYJG75_JYJL34",
  617. "DTBZ75",
  618. "JYJG76_JYJL35",
  619. "DTBZ76",
  620. "JYJG77_JYJL36",
  621. "DTBZ77",
  622. "JYJG78_JYJL36",
  623. "DTBZ78",
  624. "JYJG79_JYJL38",
  625. "DTBZ79",
  626. "JYJG80_JYJL39",
  627. "DTBZ80",
  628. "JYJG81_JYJL39",
  629. "DTBZ81",
  630. "JYJG82_JYJL39",
  631. "DTBZ82",
  632. "JYJG83_JYJL39",
  633. "DTBZ83",
  634. "JYJG84_JYJL40",
  635. "DTBZ84",
  636. "JYJG85_JYJL40",
  637. "DTBZ85",
  638. "JYJG86_JYJL40",
  639. "DTBZ86",
  640. "JYJG87_JYJL40",
  641. "DTBZ87",
  642. "JYJG88_JYJL41",
  643. "DTBZ88",
  644. "JYJG89_JYJL41",
  645. "DTBZ89",
  646. "JYJG90_JYJL42",
  647. "DTBZ90",
  648. "JYJG91_JYJL43",
  649. "DTBZ91",
  650. ];
  651. const qgsf = {
  652. 北京市: "11",
  653. 天津市: "12",
  654. 河北省: "13",
  655. 山西省: "14",
  656. 内蒙古自治区: "15",
  657. 辽宁省: "21",
  658. 吉林省: "22",
  659. 黑龙江省: "23",
  660. 上海市: "31",
  661. 江苏省: "32",
  662. 浙江省: "33",
  663. 安徽省: "34",
  664. 福建省: "35",
  665. 江西省: "36",
  666. 山东省: "37",
  667. 河南省: "41",
  668. 湖北省: "42",
  669. 湖南省: "43",
  670. 广东省: "44",
  671. 广西壮族自治区: "45",
  672. 海南省: "46",
  673. 重庆市: "50",
  674. 四川省: "51",
  675. 贵州省: "52",
  676. 云南省: "53",
  677. 西藏自治区: "54",
  678. 陕西省: "61",
  679. 甘肃省: "62",
  680. 青海省: "63",
  681. 宁夏回族自治区: "64",
  682. 新疆维吾尔自治区: "65",
  683. 台湾省: "71",
  684. 香港特别行政区: "81",
  685. 澳门特别行政区: "82",
  686. };
  687. const regions = {
  688. 银川市: {
  689. 银川市市辖区: {
  690. 兴庆区: {},
  691. 西夏区: {},
  692. 金凤区: {},
  693. },
  694. 兴庆区: {},
  695. 西夏区: {},
  696. 金凤区: {},
  697. 永宁县: {},
  698. 贺兰县: {},
  699. 灵武市: {},
  700. },
  701. 石嘴山市: {
  702. 大武口区: {},
  703. 惠农区: {},
  704. 平罗县: {},
  705. },
  706. 吴忠市: {
  707. 利通区: {},
  708. 红寺堡区: {},
  709. 盐池县: {},
  710. 同心县: {},
  711. 青铜峡市: {},
  712. },
  713. 固原市: {
  714. 原州区: {},
  715. 西吉县: {},
  716. 隆德县: {},
  717. 泾源县: {},
  718. 彭阳县: {},
  719. },
  720. 中卫市: {
  721. 中卫市市辖区: {
  722. 沙坡头区: {},
  723. },
  724. 沙坡头区: {},
  725. 中宁县: {},
  726. 海原县: {},
  727. },
  728. };
  729.  
  730. var nx = {
  731. //宁夏回族自治区: "640000",
  732. 银川市: "640100",
  733. 银川市市辖区: "640101",
  734. 兴庆区: "640104",
  735. 西夏区: "640105",
  736. 金凤区: "640106",
  737. 永宁县: "640121",
  738. 贺兰县: "640122",
  739. 灵武市: "640181",
  740. 石嘴山市: "640200",
  741. 大武口区: "640202",
  742. 惠农区: "640205",
  743. 平罗县: "640221",
  744. 吴忠市: "640300",
  745. 利通区: "640302",
  746. 红寺堡区: "640303",
  747. 盐池县: "640323",
  748. 同心县: "640324",
  749. 青铜峡市: "640381",
  750. 固原市: "640400",
  751. 原州区: "640402",
  752. 西吉县: "640422",
  753. 隆德县: "640423",
  754. 泾源县: "640424",
  755. 彭阳县: "640425",
  756. 中卫市: "640500",
  757. 中卫市市辖区: "640501",
  758. 沙坡头区: "640502",
  759. 中宁县: "640521",
  760. 海原县: "640522",
  761. };
  762. var keyvalarr1 = null,
  763. keyvalarr2 = null,
  764. keyvalarr3 = null,
  765. keyvalarr4 = null;
  766. function main() {
  767. XiaoHe();
  768. }
  769. function XiaoHe() {
  770. if (1) {
  771. keyvalarr1 = {
  772. REPORTNO: "NTD11202405871",
  773. 使用单位名称: "宁夏永建建筑工程有限公司",
  774. 设备代码: "311010339201203353",
  775. SHEBEILEIBIE: "曳引与强制驱动电梯",
  776. "内部(全面)检验日期(电类定检)": "2024年04月17日",
  777. };
  778.  
  779. keyvalarr2 = {
  780. 使用单位名称: "宁夏永建建筑工程有限公司",
  781. 使用单位组织机构代码: "916401212279302618",
  782. "设备使用(所在)地点": "永宁县团结社区日间照料中心",
  783. 设备分类代码: "曳引驱动乘客电梯",
  784. 设备型号: "DPN35",
  785. "产品编号(出厂编号)": "202209146",
  786. 使用证编号: "56",
  787. 安全管理人员: "张飞",
  788. 安全管理人员联系电话: "09514100765",
  789. 制造单位: "苏州德奥电梯有限公司",
  790. 制造日期: "2006年09月26日",
  791. GZDWMC: "-",
  792. 改造监督检验日期: "-",
  793. 维保单位名称: "宁夏通宇电梯制造发展股份有限公司",
  794. ZDSYRQ: "2023年04月",
  795. 安装监督检验日期: "2016年06月",
  796. 是否加装电梯: "否",
  797. 是否住宅电梯: "否",
  798. "内部(全面)下次检验日期(电类定检)": "2025年04月",
  799. 电梯额定载荷: "800",
  800. 电梯运行速度: "1.5",
  801. 电梯层站: "6",
  802. 电梯站数: "6",
  803. 电梯门数: "6",
  804. 控制方式: "单台集选控制",
  805. DTJYYJ: "《电梯监督检验和定期检验规则》(TSG T7001-2023)",
  806. JYYQSB: "详见(2)号工具箱",
  807. DTBZCS3: "-",
  808. DTBZCS4: "-",
  809. XCJYTJ: "符合",
  810. XCAQTJ: "符合",
  811. "内部(全面)检验结论(电类定检)": "合格",
  812. JYRY: "",
  813. "内部(全面)检验日期(电类定检)": "2024年04月17日",
  814. JHRY: "",
  815. JHRQ: "",
  816. };
  817.  
  818. keyvalarr3 = {
  819. JYJG1_JYJL1: "",
  820. DTBZ1: "-",
  821. JYJG2_JYJL1: "×",
  822. DTBZ2: "-",
  823. JYJG3_JYJL1: "×",
  824. DTBZ3: "-",
  825. JYJG4_JYJL2: "×",
  826. DTBZ4: "-",
  827. JYJG5_JYJL2: "√",
  828. DTBZ5: "-",
  829. JYJG6_JYJL3: "√",
  830. DTBZ6: "-",
  831. JYJG7_JYJL4: "√",
  832. DTBZ7: "-",
  833. JYJG8_JYJL4: "-",
  834. DTBZ8: "-",
  835. JYJG9_JYJL4: "√",
  836. DTBZ9: "-",
  837. JYJG10_JYJL4: "√",
  838. DTBZ10: "-",
  839. JYJG11_JYJL5: "√",
  840. DTBZ11: "-",
  841. JYJG12_JYJL6: "-",
  842. DTBZ12: "-",
  843. JYJG13_JYJL6: "-",
  844. DTBZ13: "-",
  845. JYJG14_JYJL6: "-",
  846. DTBZ14: "-",
  847. JYJG15_JYJL6: "-",
  848. DTBZ15: "-",
  849. JYJG16_JYJL7: "√",
  850. DTBZ16: "-",
  851. JYJG17_JYJL8: "-",
  852. DTBZ17: "-",
  853. JYJG18_JYJL8: "-",
  854. DTBZ18: "-",
  855. JYJG19_JYJL9: "-",
  856. DTBZ19: "-",
  857. JYJG20_JYJL10: "√",
  858. DTBZ20: "-",
  859. JYJG21_JYJL11: "√",
  860. DTBZ21: "-",
  861. JYJG22_JYJL12: "√",
  862. DTBZ22: "-",
  863. JYJG23_JYJL12: "√",
  864. DTBZ23: "-",
  865. JYJG24_JYJL12: "-",
  866. DTBZ24: "-",
  867. JYJG25_JYJL13: "√",
  868. DTBZ25: "-",
  869. JYJG26_JYJL13: "√",
  870. DTBZ26: "-",
  871. JYJG27_JYJL13: "√",
  872. DTBZ27: "-",
  873. JYJG28_JYJL13: "-",
  874. DTBZ28: "-",
  875. JYJG29_JYJL13: "√",
  876. DTBZ29: "-",
  877. JYJG30_JYJL14: "-",
  878. DTBZ30: "-",
  879. JYJG31_JYJL14: "√",
  880. DTBZ31: "-",
  881. JYJG32_JYJL15: "√",
  882. DTBZ32: "-",
  883. JYJG33_JYJL15: "-",
  884. DTBZ33: "-",
  885. JYJG34_JYJL15: "-",
  886. DTBZ34: "-",
  887. JYJG35_JYJL16: "√",
  888. DTBZ35: "-",
  889. JYJG36_JYJL17: "-",
  890. DTBZ36: "-",
  891. JYJG37_JYJL18: "√",
  892. DTBZ37: "-",
  893. JYJG38_JYJL18: "√",
  894. DTBZ38: "-",
  895. JYJG39_JYJL18: "√",
  896. DTBZ39: "-",
  897. JYJG40_JYJL18: "√",
  898. DTBZ40: "-",
  899. JYJG41_JYJL19: "-",
  900. DTBZ41: "-",
  901. JYJG42_JYJL20: "-",
  902. DTBZ42: "-",
  903. };
  904.  
  905. keyvalarr4 = {
  906. JYJG43_JYJL21: "√",
  907. DTBZ43: "-",
  908. JYJG44_JYJL21: "√",
  909. DTBZ44: "-",
  910. JYJG45_JYJL21: "-",
  911. DTBZ45: "-",
  912. JYJG46_JYJL21: "√",
  913. DTBZ46: "-",
  914. JYJG47_JYJL22: "√",
  915. DTBZ47: "-",
  916. JYJG48_JYJL22: "√",
  917. DTBZ48: "-",
  918. JYJG49_JYJL23: "×",
  919. DTBZ49: "-",
  920. DTSJ503: "≤6",
  921. JYJG50_JYJL24: "√",
  922. DTBZ50: "-",
  923. DTSJ504: "≤45",
  924. JYJG51_JYJL24: "√",
  925. DTBZ51: "-",
  926. JYJG52_JYJL25: "√",
  927. DTBZ52: "-",
  928. JYJG53_JYJL26: "√",
  929. DTBZ53: "-",
  930. JYJG54_JYJL26: "√",
  931. DTBZ54: "-",
  932. JYJG55_JYJL26: "√",
  933. DTBZ55: "-",
  934. JYJG56_JYJL27: "√",
  935. DTBZ56: "-",
  936. JYJG57_JYJL27: "√",
  937. DTBZ57: "-",
  938. JYJG58_JYJL28: "√",
  939. DTBZ58: "-",
  940. JYJG59_JYJL28: "√",
  941. DTBZ59: "-",
  942. JYJG60_JYJL29: "√",
  943. DTBZ60: "-",
  944. DTSJ700: "7",
  945. JYJG61_JYJL29: "√",
  946. DTBZ61: "-",
  947. JYJG62_JYJL29: "√",
  948. DTBZ62: "-",
  949. JYJG63_JYJL29: "√",
  950. DTBZ63: "-",
  951. JYJG64_JYJL30: "√",
  952. DTBZ64: "-",
  953. JYJG65_JYJL30: "√",
  954. DTBZ65: "-",
  955. JYJG66_JYJL30: "√",
  956. DTBZ66: "-",
  957. DTSJ702: "45",
  958. JYJG67_JYJL31: "√",
  959. DTBZ67: "-",
  960. DTSJ74: "23",
  961. JYJG68_JYJL31: "-",
  962. DTBZ68: "-",
  963. JYJG69_JYJL32: "√",
  964. DTBZ69: "-",
  965. JYJG70_JYJL33: "√",
  966. DTBZ70: "-",
  967. JYJG71_JYJL33: "√",
  968. DTBZ71: "-",
  969. JYJG72_JYJL34: "√",
  970. DTBZ72: "-",
  971. JYJG73_JYJL34: "√",
  972. DTBZ73: "-",
  973. JYJG74_JYJL34: "√",
  974. DTBZ74: "-",
  975. JYJG75_JYJL34: "√",
  976. DTBZ75: "-",
  977. JYJG76_JYJL35: "√",
  978. DTBZ76: "-",
  979. JYJG77_JYJL36: "-",
  980. DTBZ77: "-",
  981. JYJG78_JYJL36: "-",
  982. DTBZ78: "-",
  983. JYJG79_JYJL38: "√",
  984. DTBZ79: "-",
  985. JYJG80_JYJL39: "-",
  986. DTBZ80: "-",
  987. JYJG81_JYJL39: "√",
  988. DTBZ81: "-",
  989. JYJG82_JYJL39: "√",
  990. DTBZ82: "-",
  991. JYJG83_JYJL39: "√",
  992. DTBZ83: "-",
  993. JYJG84_JYJL40: "-",
  994. DTBZ84: "-",
  995. JYJG85_JYJL40: "-",
  996. DTBZ85: "-",
  997. JYJG86_JYJL40: "-",
  998. DTBZ86: "-",
  999. JYJG87_JYJL40: "√",
  1000. DTBZ87: "-",
  1001. JYJG88_JYJL41: "√",
  1002. DTBZ88: "-",
  1003. JYJG89_JYJL41: "√",
  1004. DTBZ89: "-",
  1005. JYJG90_JYJL42: "√",
  1006. DTBZ90: "-",
  1007. JYJG91_JYJL43: "√",
  1008. DTBZ91: "-",
  1009. };
  1010. }
  1011. var keyvalArr = {
  1012. ...keyvalarr1,
  1013. ...keyvalarr2,
  1014. ...keyvalarr3,
  1015. ...keyvalarr4,
  1016. };
  1017. const dat = replaceValuesWithFun(keyvalArr, gett);
  1018. //验证为空
  1019. //验证为空
  1020. //验证为空
  1021. if (1) {
  1022. //封面
  1023. if (1) {
  1024. if (getdtt("使用单位:") === "") {
  1025. addstrtip("使用单位名称为空!");
  1026. //highlightedFields.push(ddh('使用单位:'))
  1027. }
  1028. if (getdtt("设备代码:") === "") {
  1029. addstrtip("设备代码为空!");
  1030. }
  1031. if (getdtt("设备类别:") === "") {
  1032. addstrtip("设备类别为空!");
  1033. }
  1034. if (getdtt("检验日期:") === "") {
  1035. addstrtip("封面检验日期为空!");
  1036. }
  1037. }
  1038. //概况
  1039. if (1) {
  1040. if (gethtt("使用单位名称") === "") {
  1041. addstrtip("概况使用单位名称为空!");
  1042. }
  1043. if (gethtt("统一社会信用代码") === "") {
  1044. addstrtip("统一社会信用代码为空!");
  1045. }
  1046. if (gethtt("安装地点") === "") {
  1047. addstrtip("安装地点为空!");
  1048. }
  1049. if (gethtt("设备品种") === "") {
  1050. addstrtip("设备品种为空!");
  1051. }
  1052. if (gethtt("产品型号") === "") {
  1053. addstrtip("产品型号为空!");
  1054. }
  1055. if (gethtt("产品编号") === "") {
  1056. addstrtip("产品编号为空!");
  1057. }
  1058. if (gethtt("单位内编号") === "") {
  1059. addstrtip("单位内编号为空!");
  1060. }
  1061. if (gethtt("使用登记证编号") === "") {
  1062. addstrtip("使用登记证编号为空!");
  1063. }
  1064. if (gethtt("安全管理人员") === "") {
  1065. addstrtip("安全管理人员为空!");
  1066. }
  1067. if (gethtt("电话") === "") {
  1068. addstrtip("安全管理人员联系电话为空!");
  1069. }
  1070. if (gethtt("制造单位名称") === "") {
  1071. addstrtip("制造单位名称为空!");
  1072. }
  1073. if (gethtt("制造日期") === "") {
  1074. addstrtip("制造日期为空!");
  1075. }
  1076. if (gethtt("改造单位名称") === "") {
  1077. addstrtip("改造单位名称为空!");
  1078. }
  1079. if (gethtt("改造日期") === "") {
  1080. addstrtip("改造日期为空!");
  1081. }
  1082. if (gethtt("维护保养单位名称") === "") {
  1083. addstrtip("维保单位名称为空!");
  1084. }
  1085. if (gethtt("最近一次制动试验确认日期") === "") {
  1086. addstrtip("最近一次制动试验确认日期为空!");
  1087. }
  1088. if (gethtt("监督检验日期") === "") {
  1089. addstrtip("监督检验日期为空!");
  1090. }
  1091. if (gethtt("是否加装电梯") === "") {
  1092. addstrtip("是否加装电梯信息为空!");
  1093. }
  1094. if (gethtt("是否住宅电梯") === "") {
  1095. addstrtip("是否住宅电梯信息为空!");
  1096. }
  1097. if (gethtt("下次检验日期") === "") {
  1098. addstrtip("下次检验日期为空!");
  1099. }
  1100. if (gethtt("额定载重量") === "") {
  1101. addstrtip("电梯额定载荷为空!");
  1102. }
  1103. if (gethtt("额定速度") === "") {
  1104. addstrtip("电梯运行速度为空!");
  1105. }
  1106. if (dat.电梯层站 === "") {
  1107. addstrtip("电梯层站为空!");
  1108. }
  1109. if (dat.电梯站数 === "") {
  1110. addstrtip("电梯站数为空!");
  1111. }
  1112. if (dat.电梯门数 === "") {
  1113. addstrtip("电梯门数为空!");
  1114. }
  1115. if (gethtt("控制方式") === "") {
  1116. addstrtip("控制方式为空!");
  1117. }
  1118. if (gethtt("检验依据") === "") {
  1119. addstrtip("检验依据为空!");
  1120. }
  1121. if (gethtt("主要检验仪器设备") === "") {
  1122. addstrtip("主要检验仪器设备为空!");
  1123. }
  1124. if (dat.DTBZCS3 != "" || dat.DTBZCS4 != "") {
  1125. addstrtip("概况备注不为空!");
  1126. }
  1127.  
  1128. if (getdt("XCJYTJ") === "") {
  1129. addstrtip("现场检验条件为空!");
  1130. }
  1131. if (getdt("XCAQTJ") === "") {
  1132. addstrtip("现场安全条件为空!");
  1133. }
  1134. if (getdt("内部(全面)检验结论(电类定检)") === "") {
  1135. addstrtip("检验结论为空!");
  1136. }
  1137. if (getdt("内部(全面)检验日期(电类定检)") === "") {
  1138. addstrtip("概况检验日期为空!");
  1139. }
  1140. }
  1141. //1-5
  1142. if (1) {
  1143. if (gett("JYJG1_JYJL1") === "") {
  1144. addstrtip("第1项第1个检验结果为空!");
  1145. }
  1146. if (gett("JYJG2_JYJL1") === "") {
  1147. addstrtip("第1项第2个检验结果为空!");
  1148. }
  1149. if (gett("JYJG3_JYJL1") === "") {
  1150. addstrtip("第1项第3个检验结果空!");
  1151. }
  1152.  
  1153. if (gett("JYJG4_JYJL2") === "") {
  1154. addstrtip("第2项第1个检验结果空!");
  1155. }
  1156.  
  1157. if (gett("JYJG5_JYJL2") === "") {
  1158. addstrtip("第2项第2个检验结果空!");
  1159. }
  1160.  
  1161. if (gett("JYJG6_JYJL3") === "") {
  1162. addstrtip("第3项第1个检验结果空!");
  1163. }
  1164.  
  1165. if (gett("JYJG7_JYJL4") === "") {
  1166. addstrtip("第4项第1个检验结果空!");
  1167. }
  1168.  
  1169. if (gett("JYJG8_JYJL4") === "") {
  1170. addstrtip("第4项第2个检验结果空!");
  1171. }
  1172.  
  1173. if (gett("JYJG9_JYJL4") === "") {
  1174. addstrtip("第4项第3个检验结果空!");
  1175. }
  1176.  
  1177. if (gett("JYJG10_JYJL4") === "") {
  1178. addstrtip("第4项第4个检验结果空!");
  1179. }
  1180.  
  1181. if (gett("JYJG11_JYJL5") === "") {
  1182. addstrtip("第5项第1个检验结果空!");
  1183. }
  1184. }
  1185. //6-10
  1186. if (1) {
  1187. if (gett("JYJG12_JYJL6") === "") {
  1188. addstrtip("第6项第1个检验结果为空!");
  1189. }
  1190. if (gett("JYJG13_JYJL6") === "") {
  1191. addstrtip("第6项第2个检验结果为空!");
  1192. }
  1193. if (gett("JYJG14_JYJL6") === "") {
  1194. addstrtip("第6项第3个检验结果为空!");
  1195. }
  1196. if (gett("JYJG15_JYJL6") === "") {
  1197. addstrtip("第6项第4个检验结果为空!");
  1198. }
  1199. if (gett("JYJG16_JYJL7") === "") {
  1200. addstrtip("第7项第1个检验结果为空!");
  1201. }
  1202. if (gett("JYJG17_JYJL8") === "") {
  1203. addstrtip("第8项第1个检验结果为空!");
  1204. }
  1205. if (gett("JYJG18_JYJL8") === "") {
  1206. addstrtip("第8项第2个检验结果为空!");
  1207. }
  1208. if (gett("JYJG19_JYJL9") === "") {
  1209. addstrtip("第9项第1个检验结果为空!");
  1210. }
  1211. if (gett("JYJG20_JYJL10") === "") {
  1212. addstrtip("第10项第1个检验结果为空!");
  1213. }
  1214. }
  1215. //11-15
  1216. if (1) {
  1217. if (gett("JYJG21_JYJL11") === "") {
  1218. addstrtip("第11项第1个检验结果为空!");
  1219. }
  1220. if (gett("JYJG22_JYJL12") === "") {
  1221. addstrtip("第12项第1个检验结果为空!");
  1222. }
  1223. if (gett("JYJG23_JYJL12") === "") {
  1224. addstrtip("第12项第2个检验结果为空!");
  1225. }
  1226. if (gett("JYJG24_JYJL12") === "") {
  1227. addstrtip("第12项第3个检验结果为空!");
  1228. }
  1229. if (gett("JYJG25_JYJL13") === "") {
  1230. addstrtip("第13项第1个检验结果为空!");
  1231. }
  1232. if (gett("JYJG26_JYJL13") === "") {
  1233. addstrtip("第13项第2个检验结果为空!");
  1234. }
  1235. if (gett("JYJG27_JYJL13") === "") {
  1236. addstrtip("第13项第3个检验结果为空!");
  1237. }
  1238. if (gett("JYJG28_JYJL13") === "") {
  1239. addstrtip("第13项第4个检验结果为空!");
  1240. }
  1241. if (gett("JYJG29_JYJL13") === "") {
  1242. addstrtip("第13项第5个检验结果为空!");
  1243. }
  1244. if (gett("JYJG30_JYJL14") === "") {
  1245. addstrtip("第14项第1个检验结果为空!");
  1246. }
  1247. if (gett("JYJG31_JYJL14") === "") {
  1248. addstrtip("第14项第2个检验结果为空!");
  1249. }
  1250. if (gett("JYJG32_JYJL15") === "") {
  1251. addstrtip("第15项第1个检验结果为空!");
  1252. }
  1253. if (gett("JYJG33_JYJL15") === "") {
  1254. addstrtip("第15项第2个检验结果为空!");
  1255. }
  1256. if (gett("JYJG34_JYJL15") === "") {
  1257. addstrtip("第15项第3个检验结果为空!");
  1258. }
  1259. }
  1260. //16-20
  1261. if (1) {
  1262. if (gett("JYJG35_JYJL16") === "") {
  1263. addstrtip("第16项第1个检验结果为空!");
  1264. }
  1265. if (gett("JYJG36_JYJL17") === "") {
  1266. addstrtip("第17项第1个检验结果为空!");
  1267. }
  1268. if (gett("JYJG37_JYJL18") === "") {
  1269. addstrtip("第18项第1个检验结果为空!");
  1270. }
  1271. if (gett("JYJG38_JYJL18") === "") {
  1272. addstrtip("第18项第2个检验结果为空!");
  1273. }
  1274. if (gett("JYJG39_JYJL18") === "") {
  1275. addstrtip("第18项第3个检验结果为空!");
  1276. }
  1277. if (gett("JYJG40_JYJL18") === "") {
  1278. addstrtip("第18项第4个检验结果为空!");
  1279. }
  1280. if (gett("JYJG41_JYJL19") === "") {
  1281. addstrtip("第19项第1个检验结果为空!");
  1282. }
  1283. if (gett("JYJG42_JYJL20") === "") {
  1284. addstrtip("第20项第1个检验结果为空!");
  1285. }
  1286. }
  1287. //21-25
  1288. if (1) {
  1289. if (gett("JYJG43_JYJL21") === "") {
  1290. addstrtip("第21项第1个检验结果为空!");
  1291. }
  1292. if (gett("JYJG44_JYJL21") === "") {
  1293. addstrtip("第21项第2个检验结果为空!");
  1294. }
  1295. if (gett("JYJG45_JYJL21") === "") {
  1296. addstrtip("第21项第3个检验结果为空!");
  1297. }
  1298. if (gett("JYJG46_JYJL21") === "") {
  1299. addstrtip("第21项第4个检验结果为空!");
  1300. }
  1301. if (gett("JYJG47_JYJL22") === "") {
  1302. addstrtip("第22项第1个检验结果为空!");
  1303. }
  1304. if (gett("JYJG48_JYJL22") === "") {
  1305. addstrtip("第22项第2个检验结果为空!");
  1306. }
  1307. if (gett("JYJG49_JYJL23") === "") {
  1308. addstrtip("第23项第1个检验结果为空!");
  1309. }
  1310. if (gett("JYJG50_JYJL24") === "") {
  1311. addstrtip("第24项第1个检验结果为空!");
  1312. }
  1313. if (gett("JYJG51_JYJL24") === "") {
  1314. addstrtip("第24项第2个检验结果为空!");
  1315. }
  1316. if (gett("JYJG52_JYJL25") === "") {
  1317. addstrtip("第25项第1个检验结果为空!");
  1318. }
  1319. }
  1320. //26-30
  1321. if (1) {
  1322. if (gett("JYJG53_JYJL26") === "") {
  1323. addstrtip("第26项第1个检验结果为空!");
  1324. }
  1325. if (gett("JYJG54_JYJL26") === "") {
  1326. addstrtip("第26项第2个检验结果为空!");
  1327. }
  1328. if (gett("JYJG55_JYJL26") === "") {
  1329. addstrtip("第26项第3个检验结果为空!");
  1330. }
  1331. if (gett("JYJG56_JYJL27") === "") {
  1332. addstrtip("第27项第1个检验结果为空!");
  1333. }
  1334. if (gett("JYJG57_JYJL27") === "") {
  1335. addstrtip("第27项第2个检验结果为空!");
  1336. }
  1337. if (gett("JYJG58_JYJL28") === "") {
  1338. addstrtip("第28项第1个检验结果为空!");
  1339. }
  1340. if (gett("JYJG59_JYJL28") === "") {
  1341. addstrtip("第28项第2个检验结果为空!");
  1342. }
  1343. if (gett("JYJG60_JYJL29") === "") {
  1344. addstrtip("第29项第1个检验结果为空!");
  1345. }
  1346. if (gett("JYJG61_JYJL29") === "") {
  1347. addstrtip("第29项第2个检验结果为空!");
  1348. }
  1349. if (gett("JYJG62_JYJL29") === "") {
  1350. addstrtip("第29项第3个检验结果为空!");
  1351. }
  1352. if (gett("JYJG63_JYJL29") === "") {
  1353. addstrtip("第29项第4个检验结果为空!");
  1354. }
  1355. if (gett("JYJG64_JYJL30") === "") {
  1356. addstrtip("第30项第1个检验结果为空!");
  1357. }
  1358. if (gett("JYJG65_JYJL30") === "") {
  1359. addstrtip("第30项第2个检验结果为空!");
  1360. }
  1361. if (gett("JYJG66_JYJL30") === "") {
  1362. addstrtip("第30项第3个检验结果为空!");
  1363. }
  1364. }
  1365. //31-35
  1366. if (1) {
  1367. if (gett("JYJG67_JYJL31") === "") {
  1368. addstrtip("第31项第1个检验结果为空!");
  1369. }
  1370. if (gett("JYJG68_JYJL31") === "") {
  1371. addstrtip("第31项第2个检验结果为空!");
  1372. }
  1373. if (gett("JYJG69_JYJL32") === "") {
  1374. addstrtip("第32项第1个检验结果为空!");
  1375. }
  1376. if (gett("JYJG70_JYJL33") === "") {
  1377. addstrtip("第33项第1个检验结果为空!");
  1378. }
  1379. if (gett("JYJG71_JYJL33") === "") {
  1380. addstrtip("第33项第2个检验结果为空!");
  1381. }
  1382. if (gett("JYJG72_JYJL34") === "") {
  1383. addstrtip("第34项第1个检验结果为空!");
  1384. }
  1385. if (gett("JYJG73_JYJL34") === "") {
  1386. addstrtip("第34项第2个检验结果为空!");
  1387. }
  1388. if (gett("JYJG74_JYJL34") === "") {
  1389. addstrtip("第34项第3个检验结果为空!");
  1390. }
  1391. if (gett("JYJG75_JYJL34") === "") {
  1392. addstrtip("第34项第4个检验结果为空!");
  1393. }
  1394. if (gett("JYJG76_JYJL35") === "") {
  1395. addstrtip("第35项第1个检验结果为空!");
  1396. }
  1397. }
  1398. //36-40
  1399. if (1) {
  1400. if (gett("JYJG77_JYJL36") === "") {
  1401. addstrtip("第36项第1个检验结果为空!");
  1402. }
  1403. if (gett("JYJG78_JYJL36") === "") {
  1404. addstrtip("第37项第1个检验结果为空!");
  1405. }
  1406. if (gett("JYJG79_JYJL38") === "") {
  1407. addstrtip("第38项第1个检验结果为空!");
  1408. }
  1409. if (gett("JYJG80_JYJL39") === "") {
  1410. addstrtip("第39项第1个检验结果为空!");
  1411. }
  1412. if (gett("JYJG81_JYJL39") === "") {
  1413. addstrtip("第39项第2个检验结果为空!");
  1414. }
  1415. if (gett("JYJG82_JYJL39") === "") {
  1416. addstrtip("第39项第3个检验结果为空!");
  1417. }
  1418. if (gett("JYJG83_JYJL39") === "") {
  1419. addstrtip("第39项第4个检验结果为空!");
  1420. }
  1421. if (gett("JYJG84_JYJL40") === "") {
  1422. addstrtip("第40项第1个检验结果为空!");
  1423. }
  1424. if (gett("JYJG85_JYJL40") === "") {
  1425. addstrtip("第40项第2个检验结果为空!");
  1426. }
  1427. if (gett("JYJG86_JYJL40") === "") {
  1428. addstrtip("第40项第3个检验结果为空!");
  1429. }
  1430. if (gett("JYJG87_JYJL40") === "") {
  1431. addstrtip("第40项第4个检验结果为空!");
  1432. }
  1433. }
  1434. //41-43
  1435. if (1) {
  1436. if (gett("JYJG88_JYJL41") === "") {
  1437. addstrtip("第41项第1个检验结果为空!");
  1438. }
  1439. if (gett("JYJG89_JYJL41") === "") {
  1440. addstrtip("第41项第2个检验结果为空!");
  1441. }
  1442. if (gett("JYJG90_JYJL42") === "") {
  1443. addstrtip("第42项第1个检验结果为空!");
  1444. }
  1445. if (gett("JYJG91_JYJL43") === "") {
  1446. addstrtip("第43项第1个检验结果为空!");
  1447. }
  1448. }
  1449. //检验项目中的数值
  1450. if (1) {
  1451. /* if (gett(DTSJ503) === "") {
  1452. addstrtip("第24项(1)测量值为空!");
  1453. } */
  1454. if (dat.DTSJ503 === "") {
  1455. addstrtip("第24项(1)测量值为空!");
  1456. }
  1457. /* if (gett(DTSJ504) === "") {
  1458. addstrtip("第24项(2)测量值为空!");
  1459. } */
  1460. if (dat.DTSJ504 === "") {
  1461. addstrtip("第24项(2)测量值为空!");
  1462. }
  1463. /* if (gett(DTSJ700) === "") {
  1464. addstrtip("第29项(2)测量值为空!");
  1465. } */
  1466. if (dat.DTSJ700 === "") {
  1467. addstrtip("第29项(2)测量值为空!");
  1468. }
  1469. /* if (gett(DTSJ702) === "") {
  1470. addstrtip("第31项(1)测量值为空!");
  1471. } */
  1472. if (dat.DTSJ702 === "") {
  1473. addstrtip("第31项(1)测量值为空!");
  1474. }
  1475. /* if (gett(DTSJ74) === "") {
  1476. addstrtip("第31项(2)测量值为空!");
  1477. } */
  1478. if (dat.DTSJ74 === "") {
  1479. addstrtip("第31项(2)测量值为空!");
  1480. }
  1481. }
  1482. }
  1483. //封面信息
  1484. //封面信息
  1485. //封面信息
  1486. if (1) {
  1487. var username = document
  1488. .getElementById("1581261202417784a")
  1489. .innerText.trim();
  1490. if (!/^[\u4e00-\u9fa5\(\)\(\)]{1,39}$/g.test(username)) {
  1491. addstrtip("注意封面使用单位名称!");
  1492. }
  1493. var usernameGK = document
  1494. .getElementById("1555396405619039a")
  1495. .innerText.trim();
  1496. if (username != usernameGK) {
  1497. addstrtip("封面与概况使用单位名称不一致!");
  1498. }
  1499. //设备代码
  1500. if (1) {
  1501. if (gett("设备代码") != "-") {
  1502. const regex = /^(3110|3120)\d{5,6}(\d{4})\d{5,6}$/;
  1503. if (regex.test(gett("设备代码"))) {
  1504. const sbdmfm = gett("设备代码").match(/^(\d{4})(\d{14}|\d{16})$/);
  1505. if (
  1506. /^3110$/.test(sbdmfm[1]) &&
  1507. !/^曳引驱动乘客电梯$/.test(gett("设备分类代码"))
  1508. ) {
  1509. addstrtip('封面设备代码3110表示"曳引驱动乘客电梯"!');
  1510. }
  1511. if (
  1512. /^3120$/.test(sbdmfm[1]) &&
  1513. !/^曳引驱动载货电梯$/.test(gett("设备分类代码"))
  1514. ) {
  1515. addstrtip('封面设备代码3120表示"曳引驱动载货电梯"!');
  1516. }
  1517. } else {
  1518. addstrtip("封面设备代码格式错误!");
  1519. }
  1520. }
  1521. }
  1522. if (!/^曳引与强制驱动电梯$/.test(gett("SHEBEILEIBIE"))) {
  1523. addstrtip("封面设备类别错误!");
  1524. }
  1525. var jyrq = document
  1526. .getElementById("1710387041337455d")
  1527. .innerText.trim()
  1528. .replace(/年|月|日/g, "-")
  1529. .slice(0, -1); //封面检验日期
  1530. jyrq = YearMonthToYearMonthDay(jyrq);
  1531. if (
  1532. /^\d{4}年\d{1,2}月\d{1,2}日$/.test(
  1533. document.getElementById("1710387041337455d").innerText.trim()
  1534. )
  1535. ) {
  1536. } else {
  1537. addstrtip("封面检验日期格式为xxxx年xx月xx日");
  1538. }
  1539. if (!ZifuchuanIsDate(jyrq)) {
  1540. addstrtip("封面检验日期格式错误!");
  1541. }
  1542. }
  1543.  
  1544. //概况信息
  1545. //概况信息
  1546. //概况信息
  1547. if (1) {
  1548. if (!/^-$/.test(gett("使用单位组织机构代码"))) {
  1549. if (!/^[^IOZSV]{18}$/.test(gett("使用单位组织机构代码"))) {
  1550. addstrtip("统一社会信用代码错误!");
  1551. } else {
  1552. let sf = getProvinceByKeyValue(gett("使用单位组织机构代码"), qgsf);
  1553. let nxdm = findKeyFromCode(gett("使用单位组织机构代码"), nx);
  1554. let sfs = gett("使用单位组织机构代码").substring(2, 4);
  1555. let nxdms = gett("使用单位组织机构代码").substring(2, 8);
  1556. if (sf === "") {
  1557. addstrtip("统一社会信用代码3、4位省份信息错误!");
  1558. } else if (sf != "宁夏回族自治区") {
  1559. addstrtip('统一社会信用代码3、4位:"' + sfs + '"显示省份为:' + sf);
  1560. } else {
  1561. if (nxdm === "") {
  1562. addstrtip("统一社会信用代码第3到8位行政区划代码错误!");
  1563. } else {
  1564. if (!dat["设备使用(所在)地点"].includes(nxdm)) {
  1565. if (!checkRegionContainment(nxdm, dat["设备使用(所在)地点"])) {
  1566. addstrtip(
  1567. '注意使用单位统一社会信用代码注册(不可用)地:"' +
  1568. nxdm +
  1569. '"是否不在设备所在地!'
  1570. );
  1571. } else {
  1572. addstrtip(
  1573. '统一社会信用代码第3到8位:"' +
  1574. nxdms +
  1575. '"显示使用单位在' +
  1576. nxdm
  1577. );
  1578. }
  1579. }
  1580. }
  1581. }
  1582. }
  1583. }
  1584.  
  1585. if (!/^(曳引驱动乘客电梯|曳引驱动载货电梯)$/.test(gett("设备分类代码"))) {
  1586. addstrtip("设备品种错误!");
  1587. }
  1588. if (gett("设备型号") != "不明") {
  1589. if (!/^[a-zA-Z0-9./\\_\-()()]+$/gi.test(gett("设备型号"))) {
  1590. addstrtip("注意型号!");
  1591. }
  1592. }
  1593. if (gett("设备型号") === "-") {
  1594. addstrtip("产品型号找不到的填“不明”");
  1595. }
  1596. if (gett("产品编号(出厂编号)") != "不明") {
  1597. if (!/^[a-zA-Z0-9./\\_\-()()]+$/gi.test(gett("产品编号(出厂编号)"))) {
  1598. addstrtip("注意产品编号!");
  1599. }
  1600. }
  1601. if (gett("产品编号(出厂编号)") === "-") {
  1602. addstrtip("产品编号找不到的填“不明”");
  1603. }
  1604.  
  1605. //使用登记证编号
  1606. if (1) {
  1607. if (gett("使用证编号") != "-") {
  1608. if (isValidSYDJFormat(gett("使用证编号"))) {
  1609. const sbdmfm = gett("使用证编号").match(/^(\d{4})*$/);
  1610. if (
  1611. /^3110$/.test(sbdmfm[1]) &&
  1612. !/^曳引驱动乘客电梯$/.test(gett("设备分类代码"))
  1613. ) {
  1614. addstrtip('使用登记证编号3110表示"曳引驱动乘客电梯"!');
  1615. }
  1616. if (
  1617. /^3120$/.test(sbdmfm[1]) &&
  1618. !/^曳引驱动载货电梯$/.test(gett("设备分类代码"))
  1619. ) {
  1620. addstrtip('使用登记证编号3120表示"曳引驱动载货电梯"!');
  1621. }
  1622. } else {
  1623. const regex = /^梯(11|12)[宁](A|B|C|D|E)\d{5}[\(\(]\d{2}[\)\)]$/;
  1624. // 首先判断基本的格式匹配
  1625. if (regex.test(gett("使用证编号"))) {
  1626. const match = gett("使用证编号").match(regex);
  1627. if (match) {
  1628. if (
  1629. /^11$/.test(match[1]) &&
  1630. !/^曳引驱动乘客电梯$/.test(gett("设备分类代码"))
  1631. ) {
  1632. addstrtip('使用登记证编号11表示"曳引驱动乘客电梯"!');
  1633. }
  1634. if (
  1635. /^12$/.test(match[1]) &&
  1636. !/^曳引驱动载货电梯$/.test(gett("设备分类代码"))
  1637. ) {
  1638. addstrtip('使用登记证编号12表示"曳引驱动载货电梯"!');
  1639. }
  1640. if (!/^A$/.test(match[2])) {
  1641. addstrtip('使用登记证注册(不可用)地不在银川"!');
  1642. }
  1643. }
  1644. } else {
  1645. addstrtip('使用登记证编号格式错误"!');
  1646. }
  1647. }
  1648. }
  1649. }
  1650. if (!/^[\u4e00-\u9fa5]{2,4}$/g.test(gett("安全管理人员"))) {
  1651. addstrtip("注意安全管理人员!");
  1652. }
  1653. if (!/^(1[3-9]\d{9}|\d{4}-?\d{7})$/g.test(gett("安全管理人员联系电话"))) {
  1654. addstrtip("安全管理人员电话不正确!");
  1655. }
  1656. //制造、改造单位及日期
  1657. if (1) {
  1658. if (!/^[\u4e00-\u9fa5]{1,39}$/g.test(gett("制造单位"))) {
  1659. addstrtip("注意制造单位名称!");
  1660. }
  1661. if (gett("制造日期") === "-") {
  1662. addstrtip("制造日期查不到填“不明”!");
  1663. } else {
  1664. if (gett("制造日期") != "不明") {
  1665. var zhizaorq = document
  1666. .getElementById("1555396405618f688")
  1667. .innerText.trim()
  1668. .replace(/年|月|日/g, "-")
  1669. .slice(0, -1); // 封面检验日期
  1670. jyrq = YearMonthToYearMonthDay(jyrq);
  1671. if (!ZifuchuanIsDate(jyrq)) {
  1672. addstrtip("制造日期格式错误!");
  1673. }
  1674. }
  1675. }
  1676. if (!/^(-|[\u4e00-\u9fa5]{1,39})$/g.test(gett("GZDWMC"))) {
  1677. addstrtip("注意改造单位名称!");
  1678. }
  1679. if (gett("改造监督检验日期") === "不明") {
  1680. addstrtip("未进行改造或查不出改造日期填“-”!");
  1681. }
  1682. if (
  1683. /^-$/g.test(gett("GZDWMC")) &&
  1684. !/^-$/g.test(gett("改造监督检验日期"))
  1685. ) {
  1686. addstrtip("注意改造单位名称与改造日期的关系!");
  1687. }
  1688. if (
  1689. !/^-$/g.test(gett("GZDWMC")) &&
  1690. /^-$/g.test(gett("改造监督检验日期"))
  1691. ) {
  1692. addstrtip("注意改造单位名称与改造日期的关系!");
  1693. }
  1694. if (!/^-$/g.test(gett("改造监督检验日期"))) {
  1695. var gaizaorq = document
  1696. .getElementById("1710388733083adc5")
  1697. .innerText.trim()
  1698. .replace(/年|月|日/g, "-")
  1699. .slice(0, -1); //封面检验日期
  1700. gaizaorq = YearMonthToYearMonthDay(gaizaorq);
  1701. if (!ZifuchuanIsDate(gaizaorq)) {
  1702. addstrtip("改造日期格式错误!");
  1703. }
  1704. }
  1705. }
  1706.  
  1707. if (!/^[\u4e00-\u9fa5\(\)\(\)]{1,39}$/g.test(gett("维保单位名称"))) {
  1708. addstrtip("注意维保单位名称!");
  1709. }
  1710. var zhidongrq = document
  1711. .getElementById("1710148356446ba4c")
  1712. .innerText.trim()
  1713. .replace(/年|月|日/g, "-")
  1714. .slice(0, -1); //封面检验日期
  1715. zhidongrq = YearMonthToYearMonthDay(zhidongrq);
  1716. if (!ZifuchuanIsDate(zhidongrq)) {
  1717. addstrtip("最近一次制动试验确认日期格式错误!");
  1718. }
  1719. var jiandurq = document
  1720. .getElementById("17101483999266548")
  1721. .innerText.trim()
  1722. .replace(/年|月|日/g, "-")
  1723. .slice(0, -1); //封面检验日期
  1724. jiandurq = YearMonthToYearMonthDay(jiandurq);
  1725. if (!ZifuchuanIsDate(jiandurq)) {
  1726. addstrtip("监督日期格式错误!");
  1727. }
  1728. if (!/^(是|否)$/.test(gett("是否加装电梯"))) {
  1729. addstrtip("是否加装错误!");
  1730. }
  1731. if (!/^(是|否)$/.test(gett("是否住宅电梯"))) {
  1732. addstrtip("是否住宅错误!");
  1733. }
  1734. var gkxiacijianyanriqi = document
  1735. .getElementById("171038882039234f4")
  1736. .innerText.trim()
  1737. .replace(/年|月|日/g, "-")
  1738. .slice(0, -1); //下次检验日期
  1739. if (
  1740. !/^\d{4}年\d{2}月$/.test(gett("内部(全面)下次检验日期(电类定检)"))
  1741. ) {
  1742. addstrtip("下次检验日期精确到月!");
  1743. }
  1744. gkxiacijianyanriqi = YearMonthToYearMonthDay(gkxiacijianyanriqi);
  1745. if (!ZifuchuanIsDate(gkxiacijianyanriqi)) {
  1746. addstrtip("下次检验日期格式错误!");
  1747. }
  1748. //额定载荷与速度
  1749. if (1) {
  1750. if (!/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(gett("电梯额定载荷"))) {
  1751. addstrtip("额定载荷错误!");
  1752. }
  1753. if (!/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(gett("电梯运行速度"))) {
  1754. addstrtip("额定速度错误!");
  1755. }
  1756. if (/^曳引驱动乘客电梯$/.test(gett("设备分类代码"))) {
  1757. const standardLoads = [450, 630, 800, 1000, 1050, 1250, 1350, 1600];
  1758. if (!standardLoads.includes(parseFloat(gett("电梯额定载荷")))) {
  1759. addstrtip(
  1760. "额定载荷不是常见量450, 630, 800, 1000, 1250,1350, 1600!"
  1761. );
  1762. }
  1763. const standardSpeeds = [1, 1.5, 1.6, 1.75, 2, 2.5];
  1764. if (!standardSpeeds.includes(parseFloat(gett("电梯运行速度")))) {
  1765. addstrtip("额定速度不是常见量1, 1.5, 1.6,1.75, 2, 2.5!");
  1766. }
  1767. }
  1768. if (/^曳引驱动载货电梯$/.test(gett("设备分类代码"))) {
  1769. const standardLoads = [1000, 1250, 1600, 2000, 3000];
  1770. if (!standardLoads.includes(parseFloat(gett("电梯额定载荷")))) {
  1771. addstrtip("额定载荷不是常见量1000, 1250, 1600, 2000, 3000!");
  1772. }
  1773. const standardSpeeds = [0.5];
  1774. if (!standardSpeeds.includes(parseFloat(gett("电梯运行速度")))) {
  1775. addstrtip("额定速度不是常见量0.5!");
  1776. }
  1777. }
  1778. }
  1779.  
  1780. //层站门数
  1781. if (1) {
  1782. const dtcz = document
  1783. .getElementById("1591338788552be31")
  1784. .innerText.trim(); //dt.电梯层站
  1785. const dtzs = document
  1786. .getElementById("15554041568959913")
  1787. .innerText.trim(); //dt.电梯站数
  1788. const dtms = document
  1789. .getElementById("1555404248649fa78")
  1790. .innerText.trim(); //dt.电梯门数
  1791. if (
  1792. !(
  1793. isNormalInteger(dtcz) &&
  1794. isNormalInteger(dtzs) &&
  1795. isNormalInteger(dtms)
  1796. )
  1797. ) {
  1798. addstrtip("层站门数不是正整数!");
  1799. }
  1800. if (
  1801. parseInt(dtcz) < parseInt(dtzs) ||
  1802. parseInt(dtzs) * 2 < parseInt(dtms)
  1803. ) {
  1804. addstrtip("注意层站门数是否合理!");
  1805. }
  1806. }
  1807. //控制方式
  1808. if (1) {
  1809. const validControlTypes = [
  1810. "集选控制",
  1811. "信号控制",
  1812. "单台集选控制",
  1813. "两台并联控制",
  1814. "多台群组控制",
  1815. ];
  1816. if (!validControlTypes.includes(gett("控制方式"))) {
  1817. addstrtip(
  1818. "控制方式不是常见控制:集选控制,信号控制,单台集选控制,两台并联控制,多台群组控制!"
  1819. );
  1820. }
  1821. }
  1822. //工具箱
  1823. if (1) {
  1824. const gjxjh = validateAndExplainCode(gett("JYYQSB"));
  1825. const tip = gjxjh.message;
  1826. let bjtip = "工具箱" + tip;
  1827. addstrtip(bjtip);
  1828. }
  1829. //检验现场条件及安全确认
  1830. if (1) {
  1831. if (!/^符合$/.test(gett("XCJYTJ"))) {
  1832. addstrtip("检验现场条件确认不是“符合”!");
  1833. }
  1834. if (!/^符合$/.test(gett("XCAQTJ"))) {
  1835. addstrtip("检验现场安全确认不是“符合”!");
  1836. }
  1837. if (!/^合格$/.test(gett("内部(全面)检验结论(电类定检)"))) {
  1838. addstrtip("检验结论不是“合格”!");
  1839. }
  1840. if (
  1841. /^不符合$/.test(gett("XCJYTJ")) &&
  1842. /^合格$/.test(gett("内部(全面)检验结论(电类定检)"))
  1843. ) {
  1844. addstrtip("检验结论与检验现场条件确认矛盾!");
  1845. }
  1846. if (
  1847. /^不符合$/.test(gett("XCAQTJ")) &&
  1848. /^合格$/.test(gett("内部(全面)检验结论(电类定检)"))
  1849. ) {
  1850. addstrtip("检验结论与检验现场安全确认矛盾!");
  1851. }
  1852. }
  1853. //报告结论与下次检验日期的关系
  1854. if (1) {
  1855. if (
  1856. /^[合格,整改后合格]$/.test(gett("内部(全面)检验结论(电类定检)"))
  1857. ) {
  1858. if (
  1859. document.getElementById("1710387041337455d").innerText.trim() ===
  1860. "-"
  1861. ) {
  1862. addstrtip("报告结论合格应该有下次检验日期!");
  1863. }
  1864. }
  1865. if (/^不合格$/.test(gett("内部(全面)检验结论(电类定检)"))) {
  1866. if (
  1867. document.getElementById("1710387041337455d").innerText.trim() !==
  1868. "-"
  1869. ) {
  1870. addstrtip("报告结论不合格下次检验日期为“-”!");
  1871. }
  1872. }
  1873. }
  1874.  
  1875. //概况检验日期
  1876. if (1) {
  1877. var jyrqgk = document
  1878. .getElementById("1710387111107bbd2")
  1879. .innerText.trim()
  1880. .replace(/年|月|日/g, "-")
  1881. .slice(0, -1);
  1882. jyrqgk = YearMonthToYearMonthDay(jyrqgk);
  1883. if (!ZifuchuanIsDate(jyrqgk)) {
  1884. addstrtip("概况检验日期格式错误!");
  1885. }
  1886. }
  1887. //封面检验日期 概况检验日期 改造日期
  1888. //制造日期
  1889. //最近一次制动日期 监督日期
  1890. //下次检验日期
  1891. //制造日期 <= 监督日期 < 改造日期 <= 封面检验日期 < 下次检验日期
  1892. //监督日期 < 最近一次制动日期 <= 封面检验日期
  1893. const manufactureStr = gett("制造日期");
  1894. const supervisionStr = gett("安装监督检验日期");
  1895. const renovationStr = gett("改造监督检验日期");
  1896. // 封面检验日期
  1897. const coverInspectionStr = document
  1898. .getElementById("1710387041337455d")
  1899. .innerText.trim();
  1900. // 下次检验日期
  1901. const nextInspectionStr = gett("内部(全面)下次检验日期(电类定检)");
  1902. // 最近制动日期
  1903. const lastBrakingStr = gett("ZDSYRQ");
  1904. //概况检验日期
  1905. const generalInspectionStr = document
  1906. .getElementById("1710387111107bbd2")
  1907. .innerText.trim();
  1908. // 验证封面检验日期和概况检验日期相同
  1909. if (coverInspectionStr !== generalInspectionStr) {
  1910. addstrtip("封面检验日期和概况检验日期不一致!");
  1911. }
  1912. // 解析所有日期
  1913. const manufactureDate = parseDate(manufactureStr);
  1914. const supervisionDate = parseDate(supervisionStr);
  1915. const renovationDate = parseDate(renovationStr);
  1916. const coverInspectionDate = parseDate(coverInspectionStr);
  1917. const nextInspectionDate = parseDate(nextInspectionStr);
  1918. const lastBrakingDate = parseDate(lastBrakingStr);
  1919. if (1) {
  1920. //与当前日期进行比较
  1921. if (1) {
  1922. const now = new Date();
  1923. const oneMonthInMillis = 30 * 24 * 60 * 60 * 1000; // 30天转换为毫秒
  1924. const diff = now - coverInspectionDate;
  1925. if (!(diff >= 0 && diff < oneMonthInMillis)) {
  1926. addstrtip("封面检验日期超出当前日期前一个月范围!");
  1927. }
  1928. if (manufactureDate != null && manufactureDate >= now) {
  1929. addstrtip("制造日期大于当前日期!");
  1930. }
  1931. if (supervisionDate != null && supervisionDate >= now) {
  1932. addstrtip("监督日期大于当前日期!");
  1933. }
  1934. if (renovationDate != null && renovationDate >= now) {
  1935. addstrtip("改造日期大于当前日期!");
  1936. }
  1937. if (coverInspectionDate != null && coverInspectionDate > now) {
  1938. addstrtip("检验日期大于当前日期!");
  1939. }
  1940. if (lastBrakingDate != null && lastBrakingDate > now) {
  1941. addstrtip("制动日期大于当前日期!");
  1942. }
  1943. }
  1944. // 验证日期逻辑顺序
  1945. if (1) {
  1946. if (manufactureDate != null && supervisionDate != null) {
  1947. if (!(manufactureDate <= supervisionDate)) {
  1948. addstrtip("制造日期在监督日期之后!");
  1949. }
  1950. }
  1951. if (supervisionDate != null && renovationDate != null) {
  1952. if (!(supervisionDate <= renovationDate)) {
  1953. addstrtip("监督日期在改造日期之后!");
  1954. }
  1955. }
  1956. if (renovationDate != null && coverInspectionDate != null) {
  1957. if (!(renovationDate <= coverInspectionDate)) {
  1958. addstrtip("改造日期在检验日期之后!");
  1959. }
  1960. }
  1961. if (coverInspectionDate != null && nextInspectionDate != null) {
  1962. if (!(coverInspectionDate <= nextInspectionDate)) {
  1963. addstrtip("检验日期在下次检验日期之后!");
  1964. }
  1965. }
  1966. if (supervisionDate != null && lastBrakingDate != null) {
  1967. if (!(supervisionDate <= lastBrakingDate)) {
  1968. addstrtip("监督检验日期在最近制动日期之后!");
  1969. }
  1970. }
  1971. if (lastBrakingDate != null && coverInspectionDate != null) {
  1972. if (!(lastBrakingDate <= coverInspectionDate)) {
  1973. addstrtip("最近制动日期在检验日期之后!");
  1974. }
  1975. }
  1976. }
  1977. // 如果封面设备代码有填写,验证和解析设备代码中的年份,与制造日期和监督日期比较
  1978. if (1) {
  1979. const serialRegex = /^(3110|3120)\d{5}(\d{4})\d{5}$/;
  1980. const matchSerial = gett("设备代码").match(serialRegex);
  1981. if (matchSerial) {
  1982. // 提取年份
  1983. const yearFromSerial = parseInt(matchSerial[2], 10);
  1984. if (manufactureDate != null) {
  1985. // 判断序列号中的年份是否在制造日期之前
  1986. if (yearFromSerial > manufactureDate.getFullYear()) {
  1987. addstrtip(
  1988. "封面设备代码中的年份" + matchSerial[2] + "不应在制造日期之后"
  1989. );
  1990. }
  1991. }
  1992. if (supervisionDate != null && manufactureDate === null) {
  1993. // 判断序列号中的年份是否在监督日期之前
  1994. if (yearFromSerial > supervisionDate.getFullYear()) {
  1995. addstrtip(
  1996. "封面设备代码中的年份" + matchSerial[2] + "不应在监督日期之后"
  1997. );
  1998. }
  1999. }
  2000. }
  2001. }
  2002. //如果使用登记证编号形如梯11宁A12345(19),则验证其年份与制造监督日期的关系
  2003. if (1) {
  2004. const regexsy =
  2005. /^梯(11|12)[宁](A|B|C|D|E)\d{5}[\(\(](\d{2})[\)\)]$/;
  2006. const matchsy = gett("使用证编号").match(regexsy);
  2007. if (matchsy) {
  2008. // 提取两位数年份并转换为四位数
  2009. const yearShort = parseInt(matchsy[3], 10);
  2010. const yearFull =
  2011. yearShort >= 0 && yearShort <= 99 ? 2000 + yearShort : yearShort;
  2012. // 创建年份的Date对象,并与传入的日期对象比较
  2013. const yearDate = new Date(yearFull, 0); // 0 是一月份
  2014. if (supervisionDate != null) {
  2015. // 判断序列号中的年份是否在制造日期之前
  2016. if (yearDate < supervisionDate) {
  2017. addstrtip(
  2018. "使用登记证编号中的年份" + matchsy[3] + "在监督检验日期之前"
  2019. );
  2020. }
  2021. }
  2022. if (manufactureDate != null && supervisionDate === null) {
  2023. // 判断序列号中的年份是否在监督日期之前
  2024. if (yearDate < manufactureDate) {
  2025. addstrtip(
  2026. "使用登记证编号中的年份" + matchsy[3] + "在制造检验日期之前"
  2027. );
  2028. }
  2029. }
  2030. }
  2031. }
  2032. //如果使用登记证编号形如31106523252023562563,则验证其年份与制造监督日期的关系
  2033. if (1) {
  2034. const regexsy = /^(3110|3120)\d{6}(\d{4})\d{6}$/;
  2035. const matchsy = gett("使用证编号").match(regexsy);
  2036. if (matchsy) {
  2037. // 提取两位数年份并转换为四位数
  2038. const year = parseInt(matchsy[2], 10);
  2039. const yearDate = new Date(year, 0); // 0 是一月份
  2040. if (supervisionDate != null) {
  2041. // 判断序列号中的年份是否在制造日期之前
  2042. if (yearDate < supervisionDate) {
  2043. addstrtip(
  2044. "使用登记证编号中的年份" + matchsy[2] + "在监督检验日期之前"
  2045. );
  2046. }
  2047. }
  2048. if (manufactureDate != null && supervisionDate === null) {
  2049. // 判断序列号中的年份是否在监督日期之前
  2050. if (yearDate < manufactureDate) {
  2051. addstrtip(
  2052. "使用登记证编号中的年份" + matchsy[2] + "在制造检验日期之前"
  2053. );
  2054. }
  2055. }
  2056. }
  2057. }
  2058. //验证最近一次制动日期是否合理
  2059. if (1) {
  2060. if (supervisionDate != null && coverInspectionDate != null) {
  2061. let lastBrakingDateCal = calculateBrakeDate(
  2062. supervisionDate,
  2063. new Date(
  2064. coverInspectionDate.getFullYear(),
  2065. supervisionDate.getMonth(),
  2066. supervisionDate.getDate()
  2067. )
  2068. );
  2069. if (lastBrakingDate != null && lastBrakingDateCal != null) {
  2070. if (
  2071. lastBrakingDateCal.getFullYear() !=
  2072. lastBrakingDate.getFullYear() ||
  2073. lastBrakingDateCal.getMonth() != lastBrakingDate.getMonth()
  2074. ) {
  2075. const zjzdjc = elevatorInspection(
  2076. supervisionDate,
  2077. lastBrakingDateCal
  2078. );
  2079. let jyztstr = "";
  2080. if (lastBrakingDateCal < new Date(2024, 3, 1)) {
  2081. jyztstr = "检验";
  2082. } else {
  2083. jyztstr = zjzdjc.result;
  2084. }
  2085. addstrtip(
  2086. "注意最近一次制动日期是否应为:" +
  2087. lastBrakingDateCal.getFullYear() +
  2088. "年" +
  2089. (lastBrakingDateCal.getMonth() + 1).toString() +
  2090. "月,该日期属于" +
  2091. jyztstr +
  2092. "年份"
  2093. );
  2094. }
  2095. }
  2096. }
  2097. }
  2098. //验证本次下次检验日期是否合理
  2099. if (supervisionDate != null && coverInspectionDate != null) {
  2100. const yanzhengre = elevatorInspection(
  2101. supervisionDate,
  2102. coverInspectionDate
  2103. );
  2104. if (yanzhengre.result != "错误") {
  2105. if (
  2106. !(
  2107. yanzhengre.date.getFullYear() ===
  2108. nextInspectionDate.getFullYear() &&
  2109. yanzhengre.date.getMonth() === nextInspectionDate.getMonth()
  2110. )
  2111. ) {
  2112. addstrtip(
  2113. "注意下次检验日期是否应该是" +
  2114. yanzhengre.date.getFullYear() +
  2115. "年" +
  2116. (yanzhengre.date.getMonth() + 1).toString() +
  2117. "月"
  2118. );
  2119. }
  2120. if (yanzhengre.result === "检测") {
  2121. addstrtip(
  2122. coverInspectionDate.getFullYear() +
  2123. "年" +
  2124. (supervisionDate.getMonth() + 1).toString() +
  2125. "月应该进行检测,下次检验日期是:" +
  2126. yanzhengre.date.getFullYear() +
  2127. "年" +
  2128. (yanzhengre.date.getMonth() + 1).toString() +
  2129. "月"
  2130. );
  2131. }
  2132. if (yanzhengre.result === "检验") {
  2133. addstrtip(
  2134. "下次检验日期是:" +
  2135. yanzhengre.date.getFullYear() +
  2136. "年" +
  2137. (yanzhengre.date.getMonth() + 1).toString() +
  2138. "月"
  2139. );
  2140. }
  2141. }
  2142. }
  2143. }
  2144. //检验记录
  2145. //检验记录
  2146. //检验记录
  2147. //验证检验结论是否正确,检验项目备注是否有填写
  2148.  
  2149. if (1) {
  2150. //判断关键、一般项目结论与报告结论的关系
  2151. if (1) {
  2152. // 指定的数集合
  2153. const specificNumbers = new Set([
  2154. 4, 7, 9, 10, 12, 13, 18, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35,
  2155. 36, 37, 38, 39, 40, 41, 42,
  2156. ]);
  2157. const normalNumbers = new Set([
  2158. 1, 2, 3, 5, 6, 8, 11, 14, 15, 16, 17, 19, 20, 21, 22, 23, 32, 43,
  2159. ]);
  2160. const symbolToCheckBHG = "×";
  2161. const symbolToCheckWCX = "-";
  2162. const symbolToCheckFJHG = "△";
  2163. //关键项目
  2164. const GJbuhegeJson = getXMKeyValues(
  2165. dat,
  2166. specificNumbers,
  2167. symbolToCheckBHG
  2168. );
  2169. //一般项目
  2170. const YBbuhegeJson = getXMKeyValues(
  2171. dat,
  2172. normalNumbers,
  2173. symbolToCheckBHG
  2174. );
  2175. //关键项目复检合格
  2176. const GJFJHGJson = getXMKeyValues(
  2177. dat,
  2178. specificNumbers,
  2179. symbolToCheckFJHG
  2180. );
  2181. //一般项目复检合格
  2182. const YBFJHGJson = getXMKeyValues(
  2183. dat,
  2184. normalNumbers,
  2185. symbolToCheckFJHG
  2186. );
  2187.  
  2188. if (Object.keys(GJbuhegeJson).length === 0) {
  2189. if (Object.keys(YBbuhegeJson).length === 0) {
  2190. if (gett("内部(全面)检验结论(电类定检)") != "合格") {
  2191. addstrtip("检验项目全部符合,检验结论应该为“合格”!");
  2192. }
  2193. } else if (
  2194. Object.keys(YBbuhegeJson).length +
  2195. Object.keys(YBFJHGJson).length <=
  2196. 3
  2197. ) {
  2198. // 初始化一个数组来存储提取的数字
  2199. const extractedNumbers = [];
  2200. // 遍历JSON对象的每个键
  2201. for (const key in YBbuhegeJson) {
  2202. // 使用正则表达式匹配"JYJL"后面的数字
  2203. const match = key.match(/JYJL(\d+)/);
  2204. if (match) {
  2205. // 如果找到了匹配项,则将数字添加到数组中
  2206. extractedNumbers.push(parseInt(match[1], 10)); // 使用parseInt将字符串转换为整数
  2207. }
  2208. }
  2209. // 如果你只想要唯一的数字,并且不关心它们在原始JSON中的顺序,可以使用Set来去除重复项
  2210. const uniqueNumbers = [...new Set(extractedNumbers)];
  2211. if (!validateString1(dat.DTBZCS3, uniqueNumbers)) {
  2212. addstrtip(
  2213. "关键项目全部符合,一般项目不符合监护使用项及整改后符合项共不超过3项,备注有误!备注模板“本记录第1、2、3项的检验结果为不符合,使用单位已经承诺采取安全措施,对电梯实行监护使用(见编号为TZS-DT-2401804的《电梯检验意见通知书》)”,考虑格式、不符合项序号、意见通知书年份等是否有误!"
  2214. );
  2215. }
  2216. if (gett("内部(全面)检验结论(电类定检)") != "整改后合格") {
  2217. addstrtip(
  2218. "关键项目全部符合,一般项目不符合监护使用及整改后符合项共不超过3项,检验结论应该为“整改后合格”!"
  2219. );
  2220. }
  2221. } else if (
  2222. Object.keys(YBbuhegeJson).length +
  2223. Object.keys(YBFJHGJson).length >
  2224. 3
  2225. ) {
  2226. addstrtip(
  2227. "关键项目全部符合,一般项目不符合监护使用项及整改后符合项共超过3项,一般项目都应打“×””!"
  2228. );
  2229. } else if (Object.keys(YBbuhegeJson).length > 3) {
  2230. if (gett("内部(全面)检验结论(电类定检)") != "不合格") {
  2231. addstrtip(
  2232. "关键项目全部符合,一般项目不符合共超过3项,检验结论应该为“不合格”!"
  2233. );
  2234. }
  2235. }
  2236. } else {
  2237. if (gett("内部(全面)检验结论(电类定检)") != "不合格") {
  2238. addstrtip("关键项目有不符合,检验结论应该为“不合格”!");
  2239. }
  2240. }
  2241. const xiangmuBeizuJson = checkDTBZValues(dat);
  2242. if (dat.DTBZ44 != "") {
  2243. if (Object.keys(xiangmuBeizuJson).length > 1) {
  2244. //"JYJG44_JYJL21":"√","DTBZ44":"-"对重块
  2245. addstrtip("除对重块备注外仍有检验项目备注不是空!");
  2246. }
  2247. } else if (Object.keys(xiangmuBeizuJson).length > 0) {
  2248. //"JYJG44_JYJL21":"√","DTBZ44":"-"对重块
  2249. addstrtip("除对重块备注外仍有检验项目备注不是空!");
  2250. }
  2251. }
  2252.  
  2253. //1-9
  2254. //"JYJG1_JYJL1":"√","DTBZ1":""
  2255. if (1) {
  2256. //1
  2257. if (dat.JYJG1_JYJL1 === "×") {
  2258. addstrtip(
  2259. "备注应说明“未注册(不可用),请持不合格报告到市民大厅办理注册(不可用)后重新报检!”"
  2260. );
  2261. }
  2262. //4
  2263. if (dat.JYJG8_JYJL4 === "-") {
  2264. if (parseFloat(dat.电梯运行速度) > 1) {
  2265. addstrtip("电梯速度与缓冲器类型不匹配!");
  2266. }
  2267. }
  2268. //5
  2269. if (supervisionDate != null) {
  2270. const curdate = new Date();
  2271. if (curdate.getFullYear() - supervisionDate.getFullYear() > 14) {
  2272. if (dat.JYJG11_JYJL5 === "-") {
  2273. addstrtip("超过15年的电梯应检验第5项接地故障保护!");
  2274. }
  2275. }
  2276. if (curdate.getFullYear() - supervisionDate.getFullYear() < 15) {
  2277. if (dat.JYJG11_JYJL5 != "-") {
  2278. addstrtip("不超过15年的第5项电梯接地故障保护不需要检验!");
  2279. }
  2280. }
  2281. }
  2282. //6
  2283. //"JYJG12_JYJL6":"","DTBZ12":"","JYJG13_JYJL6":"","DTBZ13":""
  2284. //,"JYJG14_JYJL6":"","DTBZ14":"","JYJG15_JYJL6":"","DTBZ15":""
  2285. if (supervisionDate != null) {
  2286. if (supervisionDate < new Date(2017, 10, 1)) {
  2287. if (
  2288. dat.JYJG12_JYJL6 != "-" ||
  2289. dat.JYJG13_JYJL6 != "-" ||
  2290. dat.JYJG14_JYJL6 != "-" ||
  2291. dat.JYJG15_JYJL6 != "-"
  2292. ) {
  2293. addstrtip("注意2017.10.1以前的电梯没有第6项旁路装置!");
  2294. }
  2295. }
  2296. if (supervisionDate >= new Date(2017, 10, 1)) {
  2297. if (
  2298. dat.JYJG12_JYJL6 === "-" ||
  2299. dat.JYJG13_JYJL6 === "-" ||
  2300. dat.JYJG14_JYJL6 === "-" ||
  2301. dat.JYJG15_JYJL6 === "-"
  2302. ) {
  2303. addstrtip("注意2017.10.1以后的电梯有第6项旁路装置!");
  2304. }
  2305. }
  2306. }
  2307. //7
  2308. if (supervisionDate != null) {
  2309. if (supervisionDate < new Date(2017, 10, 1)) {
  2310. if (dat.JYJG16_JYJL7 != "-") {
  2311. addstrtip(
  2312. "注意2017.10.1以前的电梯不检验第7项制动器状态监测功能!"
  2313. );
  2314. }
  2315. }
  2316. if (supervisionDate >= new Date(2017, 10, 1)) {
  2317. if (dat.JYJG16_JYJL7 === "-") {
  2318. addstrtip(
  2319. "注意2017.10.1以后的电梯应检验第7项制动器状态监测功能!"
  2320. );
  2321. }
  2322. }
  2323. }
  2324. }
  2325. //10-19
  2326. if (1) {
  2327. //10
  2328. //10."JYJG20_JYJL10":"","DTBZ20":""
  2329. if (1) {
  2330. if (parseInt(dat.电梯层站) > 7) {
  2331. if (dat.JYJG20_JYJL10 === "-") {
  2332. addstrtip("注意提升高度大于30m需要设置第10项紧急报警装置!");
  2333. }
  2334. } else if (parseInt(dat.电梯层站) <= 7) {
  2335. if (dat.JYJG20_JYJL10 != "-") {
  2336. addstrtip(
  2337. "注意提升高度小于30m可能不需要设置第10项紧急报警装置!"
  2338. );
  2339. }
  2340. }
  2341. }
  2342. //12
  2343. //"JYJG22_JYJL12":"","DTBZ22":"","JYJG23_JYJL12":"","DTBZ23":"","JYJG24_JYJL12":"","DTBZ24":""
  2344. if (supervisionDate != null) {
  2345. if (supervisionDate < new Date(2023, 4, 2)) {
  2346. if (dat.JYJG22_JYJL12 != "-") {
  2347. addstrtip("未按照TSG T7001-2023监督检验的电梯,12-1不检验!");
  2348. }
  2349. }
  2350. if (supervisionDate >= new Date(2023, 4, 2)) {
  2351. if (dat.JYJG22_JYJL12 === "-") {
  2352. addstrtip("按照TSG T7001-2023监督检验的电梯,12-1需要检验!");
  2353. }
  2354. }
  2355. }
  2356. //13手动紧急操作装置
  2357. //JYJG28_JYJL13
  2358. if (manufactureDate != null) {
  2359. if (manufactureDate < new Date(2004, 1, 1)) {
  2360. if (dat.JYJG28_JYJL13 != "-") {
  2361. addstrtip(
  2362. "按照GB7588-1995及更早标准生产的电梯,如果未依据TSG T7001、2023检验,第13(4)是否不检验!"
  2363. );
  2364. }
  2365. }
  2366. if (manufactureDate >= new Date(2004, 1, 1)) {
  2367. if (dat.JYJG28_JYJL13 === "-") {
  2368. addstrtip(
  2369. "按照GB7588-2003及之后新标准生产的电梯,第13(4)是否应检验!"
  2370. );
  2371. }
  2372. }
  2373. }
  2374. //14、15
  2375. //钢丝绳、包覆带
  2376. if (1) {
  2377. if (dat.JYJG30_JYJL14 != "-" || dat.JYJG31_JYJL14 != "-") {
  2378. if (
  2379. dat.JYJG32_JYJL15 != "-" ||
  2380. dat.JYJG33_JYJL15 != "-" ||
  2381. dat.JYJG34_JYJL15 != "-"
  2382. ) {
  2383. addstrtip("14、15钢丝绳和包覆带有同时勾选!");
  2384. }
  2385. }
  2386. if (supervisionDate != null) {
  2387. const curdate = new Date();
  2388. if (curdate.getFullYear() - supervisionDate.getFullYear() < 15) {
  2389. if (dat.JYJG30_JYJL14 != "-" || dat.JYJG31_JYJL14 != "-") {
  2390. addstrtip("不超过15年的电梯14项钢丝绳不需要检验!");
  2391. }
  2392. }
  2393. }
  2394. if (supervisionDate != null) {
  2395. const curdate = new Date();
  2396. if (curdate.getFullYear() - supervisionDate.getFullYear() < 15) {
  2397. if (
  2398. dat.JYJG32_JYJL15 != "-" ||
  2399. dat.JYJG33_JYJL15 != "-" ||
  2400. dat.JYJG34_JYJL15 != "-"
  2401. ) {
  2402. addstrtip("不超过15年的电梯15项包覆带不需要检验!");
  2403. }
  2404. }
  2405. }
  2406. if (supervisionDate != null) {
  2407. const curdate = new Date();
  2408. if (curdate.getFullYear() - supervisionDate.getFullYear() > 14) {
  2409. if (dat.JYJG30_JYJL14 === "-" && dat.JYJG31_JYJL14 === "-") {
  2410. if (
  2411. dat.JYJG32_JYJL15 === "-" ||
  2412. dat.JYJG33_JYJL15 === "-" ||
  2413. dat.JYJG34_JYJL15 === "-"
  2414. ) {
  2415. addstrtip("14、15钢丝绳和包覆带至少选一类!");
  2416. }
  2417. }
  2418. }
  2419. }
  2420. if (supervisionDate != null) {
  2421. if (supervisionDate < new Date(2023, 4, 2)) {
  2422. if (dat.JYJG33_JYJL15 != "-" || dat.JYJG34_JYJL15 != "-") {
  2423. addstrtip(
  2424. "未按照TSG T7001-2023监督检验的电梯,15-2、3不检验!"
  2425. );
  2426. }
  2427. }
  2428. if (supervisionDate >= new Date(2023, 4, 2)) {
  2429. if (dat.JYJG33_JYJL15 === "-" || dat.JYJG34_JYJL15 === "-") {
  2430. addstrtip(
  2431. "按照TSG T7001-2023监督检验的电梯,15-2、3需要检验!"
  2432. );
  2433. }
  2434. }
  2435. }
  2436. }
  2437. //16悬挂装置端部固定
  2438. if (supervisionDate != null) {
  2439. const curdate = new Date();
  2440. if (curdate.getFullYear() - supervisionDate.getFullYear() > 14) {
  2441. if (dat.JYJG35_JYJL16 === "-") {
  2442. addstrtip("超过15年的电梯应检验第16项悬挂装置端部固定!");
  2443. }
  2444. }
  2445. if (curdate.getFullYear() - supervisionDate.getFullYear() < 15) {
  2446. if (dat.JYJG35_JYJL16 != "-") {
  2447. addstrtip("不超过15年的第16项悬挂装置端部固定不需要检验!");
  2448. }
  2449. }
  2450. }
  2451. //18_JYJL18))
  2452. //速度与反绳轮
  2453. if (1) {
  2454. if (
  2455. !(
  2456. (dat.JYJG37_JYJL18 === "-" &&
  2457. dat.JYJG38_JYJL18 === "-" &&
  2458. dat.JYJG39_JYJL18 === "-" &&
  2459. dat.JYJG40_JYJL18 === "-") ||
  2460. (dat.JYJG37_JYJL18 != "-" &&
  2461. dat.JYJG38_JYJL18 != "-" &&
  2462. dat.JYJG39_JYJL18 != "-" &&
  2463. dat.JYJG40_JYJL18 != "-")
  2464. )
  2465. ) {
  2466. addstrtip("第18项全部有或者无!");
  2467. }
  2468. if (
  2469. dat.JYJG37_JYJL18 != "-" &&
  2470. dat.JYJG38_JYJL18 != "-" &&
  2471. dat.JYJG39_JYJL18 != "-" &&
  2472. dat.JYJG40_JYJL18 != "-"
  2473. ) {
  2474. if (dat.JYJG37_JYJL18 === "√" || dat.JYJG37_JYJL18 === "△") {
  2475. if (parseFloat(dat.电梯运行速度) > 1.75) {
  2476. addstrtip("速度大于1.75,18项(1)勾选错误!");
  2477. }
  2478. }
  2479. if (dat.JYJG37_JYJL18 === "×") {
  2480. if (parseFloat(dat.电梯运行速度) <= 1.75) {
  2481. addstrtip("速度小于1.75,18项(1)勾选错误!");
  2482. }
  2483. }
  2484. }
  2485. }
  2486. }
  2487. //20-29
  2488. if (1) {
  2489. //21对重块数量或高度
  2490. //"JYJG44_JYJL21":"√","DTBZ44":"-"
  2491. if (dat.JYJG44_JYJL21 === "√") {
  2492. if (
  2493. !/^\d+(\.\d+)?\s*(块|厘米|cm|毫米|mm|米|m)$/i.test(dat.DTBZ44)
  2494. ) {
  2495. addstrtip("第21(2)对重块备注信息填写错误!");
  2496. }
  2497. }
  2498. //23轿厢语音播报系统
  2499. if (supervisionDate != null) {
  2500. if (supervisionDate < new Date(2023, 4, 2)) {
  2501. if (dat.JYJG49_JYJL23 != "-") {
  2502. addstrtip("未按照TSG T7001-2023监督检验的电梯,第23项不检验!");
  2503. }
  2504. }
  2505. if (supervisionDate >= new Date(2023, 4, 2)) {
  2506. if (dat.JYJG49_JYJL23 === "-") {
  2507. addstrtip("按照TSG T7001-2023监督检验的电梯,第23项需要检验!");
  2508. }
  2509. }
  2510. }
  2511. //24门扇间隙
  2512. if (
  2513. (dat.JYJG50_JYJL24 === "-" && dat.DTSJ503 != "-") ||
  2514. (dat.JYJG50_JYJL24 != "-" && dat.DTSJ503 === "-")
  2515. ) {
  2516. addstrtip("第24项门间隙(1)测量数据与结果矛盾!");
  2517. }
  2518. if (
  2519. (dat.JYJG51_JYJL24 === "-" && dat.DTSJ504 != "-") ||
  2520. (dat.JYJG51_JYJL24 != "-" && dat.DTSJ504 === "-")
  2521. ) {
  2522. addstrtip("第24项门间隙(2)测量数据与结果矛盾!");
  2523. }
  2524. if (supervisionDate != null) {
  2525. const curdate = new Date();
  2526. if (curdate.getFullYear() - supervisionDate.getFullYear() > 14) {
  2527. if (
  2528. dat.JYJG50_JYJL24 === "-" ||
  2529. dat.JYJG51_JYJL24 === "-" ||
  2530. dat.DTSJ503 === "-" ||
  2531. dat.DTSJ504 === "-"
  2532. ) {
  2533. addstrtip("超过15年的电梯应检验第24项门间隙!");
  2534. } else {
  2535. if (dat.设备分类代码 === "曳引驱动乘客电梯") {
  2536. if (/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(dat.DTSJ503)) {
  2537. if (
  2538. parseFloat(dat.DTSJ503) <= 6 &&
  2539. parseFloat(dat.DTSJ503) >= 0
  2540. ) {
  2541. if (dat.JYJG50_JYJL24 === "×") {
  2542. addstrtip(
  2543. "第24项门间隙(1)实测值:" + dat.DTSJ503 + "应为符合!"
  2544. );
  2545. }
  2546. } else if (parseFloat(dat.DTSJ503) > 6) {
  2547. if (dat.JYJG50_JYJL24 != "×") {
  2548. addstrtip(
  2549. "第24项门间隙(1)实测值:" +
  2550. dat.DTSJ503 +
  2551. "应为不符合!"
  2552. );
  2553. }
  2554. }
  2555. } else if (/^≤6$/.test(dat.DTSJ503)) {
  2556. if (dat.JYJG50_JYJL24 === "×") {
  2557. addstrtip(
  2558. "第24项门间隙(1)目测值:" + dat.DTSJ503 + "应为符合!"
  2559. );
  2560. }
  2561. } else {
  2562. addstrtip("第24项门间隙(1)测量值格式错误!");
  2563. }
  2564. } else if (dat.设备分类代码 === "曳引驱动载货电梯") {
  2565. if (/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(dat.DTSJ503)) {
  2566. if (
  2567. parseFloat(dat.DTSJ503) <= 10 &&
  2568. parseFloat(dat.DTSJ503) >= 0
  2569. ) {
  2570. if (dat.JYJG50_JYJL24 === "×") {
  2571. addstrtip(
  2572. "第24项门间隙(1)实测值:" + dat.DTSJ503 + "应为符合!"
  2573. );
  2574. }
  2575. } else if (parseFloat(dat.DTSJ503) > 10) {
  2576. if (dat.JYJG50_JYJL24 != "×") {
  2577. addstrtip(
  2578. "第24项门间隙(1)实测值:" +
  2579. dat.DTSJ503 +
  2580. "应为不符合!"
  2581. );
  2582. }
  2583. }
  2584. } else if (/^≤10$/.test(dat.DTSJ503)) {
  2585. if (dat.JYJG50_JYJL24 === "×") {
  2586. addstrtip(
  2587. "第24项门间隙(1)目测值:" + dat.DTSJ503 + "应为符合!"
  2588. );
  2589. } else {
  2590. addstrtip("第24项门间隙(1)测量值格式错误!");
  2591. }
  2592. }
  2593. }
  2594. if (/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(dat.DTSJ504)) {
  2595. if (parseFloat(dat.DTSJ504) <= 30) {
  2596. if (dat.JYJG51_JYJL24 === "×") {
  2597. addstrtip(
  2598. "第24项门间隙(2)实测值:" + dat.DTSJ504 + "应为符合!"
  2599. );
  2600. }
  2601. } else if (
  2602. parseFloat(dat.DTSJ504) > 30 &&
  2603. parseFloat(dat.DTSJ504) <= 45
  2604. ) {
  2605. if (dat.JYJG51_JYJL24 === "×") {
  2606. addstrtip(
  2607. "若为中分门,第24项门间隙(2)实测值:" +
  2608. dat.DTSJ504 +
  2609. "应为符合!"
  2610. );
  2611. } else if (dat.JYJG51_JYJL24 != "×") {
  2612. addstrtip(
  2613. "若为旁开门,第24项门间隙(2)实测值:" +
  2614. dat.DTSJ504 +
  2615. "应为不符合!"
  2616. );
  2617. }
  2618. } else {
  2619. if (dat.JYJG51_JYJL24 != "×") {
  2620. addstrtip(
  2621. "第24项门间隙(2)实测值:" + dat.DTSJ504 + "应为不符合!"
  2622. );
  2623. }
  2624. }
  2625. } else if (dat.DTSJ504 === "≤45") {
  2626. if (dat.JYJG51_JYJL24 === "×") {
  2627. addstrtip(
  2628. "第24项门间隙(2)实测值:" + dat.DTSJ504 + "应为符合!"
  2629. );
  2630. }
  2631. } else {
  2632. addstrtip("第24项门间隙(2)实测值格式错误!");
  2633. }
  2634. }
  2635. }
  2636. if (curdate.getFullYear() - supervisionDate.getFullYear() < 15) {
  2637. if (
  2638. dat.JYJG50_JYJL24 != "-" ||
  2639. dat.JYJG51_JYJL24 != "-" ||
  2640. dat.DTSJ503 != "-" ||
  2641. dat.DTSJ504 != "-"
  2642. ) {
  2643. addstrtip("不超过15年的第24项门间隙不需要检验!");
  2644. }
  2645. }
  2646. }
  2647. //26门的运行和导向装置
  2648. if (supervisionDate != null) {
  2649. if (supervisionDate < new Date(2017, 10, 1)) {
  2650. if (dat.JYJG55_JYJL26 != "-") {
  2651. addstrtip(
  2652. "注意2017.10.1以前的电梯不检验第26项(3)层门啮合标记!"
  2653. );
  2654. }
  2655. }
  2656. if (supervisionDate >= new Date(2017, 10, 1)) {
  2657. if (dat.JYJG55_JYJL26 === "-") {
  2658. addstrtip(
  2659. "注意2017.10.1以后的电梯应检验第26项(3)层门啮合标记!"
  2660. );
  2661. }
  2662. }
  2663. }
  2664. //28紧急开锁
  2665. if (supervisionDate != null) {
  2666. if (supervisionDate < new Date(2017, 10, 1)) {
  2667. if (dat.JYJG59_JYJL28 != "-") {
  2668. addstrtip("注意2017.10.1以前的电梯不检验第28项(2)紧急开锁!");
  2669. }
  2670. }
  2671. if (supervisionDate >= new Date(2017, 10, 1)) {
  2672. if (dat.JYJG59_JYJL28 === "-") {
  2673. addstrtip("注意2017.10.1以后的电梯应检验第28项(2)紧急开锁!");
  2674. }
  2675. }
  2676. }
  2677. //29门的锁紧
  2678. //"JYJG60_JYJL29":"","DTBZ60":"","DTSJ700":"7mm","JYJG61_JYJL29":"","DTBZ61":"","JYJG62_JYJL29":"","DTBZ62":"","JYJG63_JYJL29":"","DTBZ63":""
  2679. if (
  2680. (dat.JYJG61_JYJL29 === "-" && dat.DTSJ700 != "-") ||
  2681. (dat.JYJG61_JYJL29 != "-" && dat.DTSJ700 === "-")
  2682. ) {
  2683. addstrtip("第29项门锁紧(2)测量数据与结果矛盾!");
  2684. }
  2685. if (/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(dat.DTSJ700)) {
  2686. if (dat.JYJG61_JYJL29 === "√" || dat.JYJG61_JYJL29 === "△") {
  2687. if (parseFloat(dat.DTSJ700) > 7) {
  2688. addstrtip("第29项锁紧啮合深度测量数据显示结果应为不符合!");
  2689. }
  2690. }
  2691. if (dat.JYJG61_JYJL29 === "×") {
  2692. if (parseFloat(dat.DTSJ700) <= 7) {
  2693. addstrtip("第29项锁紧啮合深度测量数据显示结果应为符合!");
  2694. }
  2695. }
  2696. } else {
  2697. addstrtip("第29项锁紧啮合深度测量数值格式错误!");
  2698. }
  2699. }
  2700. //30-39
  2701. if (1) {
  2702. //31平衡系数
  2703. //DTSJ702,"JYJG67_JYJL31":"","DTBZ67":"","DTSJ74":"","JYJG68_JYJL31":"","DTBZ68":""
  2704. if (1) {
  2705. if (
  2706. (dat.JYJG67_JYJL31 === "-" && dat.DTSJ702 != "-") ||
  2707. (dat.JYJG67_JYJL31 != "-" && dat.DTSJ702 === "-")
  2708. ) {
  2709. addstrtip("第31项平衡系数(1)测量数据与结果矛盾!");
  2710. }
  2711. if (
  2712. (dat.JYJG68_JYJL31 === "-" && dat.DTSJ74 != "-") ||
  2713. (dat.JYJG68_JYJL31 != "-" && dat.DTSJ74 === "-")
  2714. ) {
  2715. addstrtip("第31项平衡系数(2)测量数据与结果矛盾!");
  2716. }
  2717. if (dat.JYJG90_JYJL42 != "-") {
  2718. if (/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(dat.DTSJ702)) {
  2719. if (dat.JYJG67_JYJL31 === "√" || dat.JYJG67_JYJL31 === "△") {
  2720. if (
  2721. parseFloat(dat.DTSJ702) < 40 ||
  2722. parseFloat(dat.DTSJ702) > 50
  2723. ) {
  2724. addstrtip("第31项平衡系数(1)测量数据显示结果应为不符合!");
  2725. }
  2726. }
  2727. if (dat.JYJG67_JYJL31 === "×") {
  2728. if (
  2729. parseFloat(dat.DTSJ702) >= 40 &&
  2730. parseFloat(dat.DTSJ702) <= 50
  2731. ) {
  2732. addstrtip("第31项平衡系数(1)测量数据显示结果应为符合!");
  2733. }
  2734. }
  2735. if (dat.JYJG67_JYJL31 === "-") {
  2736. addstrtip("第31项平衡系数(1)测量数据与结果矛盾!");
  2737. }
  2738. if (dat.JYJG67_JYJL31 === "×") {
  2739. const rs32_34 =
  2740. dat.JYJG69_JYJL32 !== "-" ||
  2741. dat.JYJG70_JYJL33 !== "-" ||
  2742. dat.JYJG71_JYJL33 !== "-" ||
  2743. dat.JYJG72_JYJL34 !== "-" ||
  2744. dat.JYJG73_JYJL34 !== "-" ||
  2745. dat.JYJG74_JYJL34 !== "-" ||
  2746. dat.JYJG75_JYJL34 !== "-";
  2747. const rs35_39 =
  2748. dat.JYJG76_JYJL35 !== "-" ||
  2749. dat.JYJG77_JYJL36 !== "-" ||
  2750. dat.JYJG78_JYJL36 !== "-" ||
  2751. dat.JYJG79_JYJL38 !== "-" ||
  2752. dat.JYJG80_JYJL39 !== "-" ||
  2753. dat.JYJG81_JYJL39 !== "-" ||
  2754. dat.JYJG82_JYJL39 !== "-" ||
  2755. dat.JYJG83_JYJL39 !== "-";
  2756. const rs40_43 =
  2757. dat.JYJG84_JYJL40 !== "-" ||
  2758. dat.JYJG85_JYJL40 !== "-" ||
  2759. dat.JYJG86_JYJL40 !== "-" ||
  2760. dat.JYJG87_JYJL40 !== "-" ||
  2761. dat.JYJG88_JYJL41 !== "-" ||
  2762. dat.JYJG89_JYJL41 !== "-" ||
  2763. dat.JYJG90_JYJL42 !== "-" ||
  2764. dat.JYJG91_JYJL43 !== "-";
  2765. if (rs32_34 || rs35_39 || rs40_43) {
  2766. addstrtip("平衡系数不合格,第32-43项应为“-”!");
  2767. }
  2768. }
  2769. } else {
  2770. addstrtip("第31项平衡系数(1)测量数值格式错误!");
  2771. }
  2772. const phxs2 = document
  2773. .getElementById("1701504018295d212")
  2774. .innerText.trim();
  2775. if (phxs2 != "-" || dat.JYJG68_JYJL31 != "-") {
  2776. addstrtip("制动试验时只进行第31项(1)的检验!");
  2777. }
  2778. } else {
  2779. if (dat.DTSJ702 != "-" || dat.JYJG67_JYJL31 != "-") {
  2780. addstrtip("没有制动试验时只进行第31项(2)的检验!");
  2781. }
  2782. const phxs22 = document
  2783. .getElementById("1701504018295d212")
  2784. .innerText.trim();
  2785. if (/^([1-9]\d*(\.\d+)?|0\.\d+)$/.test(phxs22)) {
  2786. if (dat.JYJG68_JYJL31 === "√" || dat.JYJG68_JYJL31 === "△") {
  2787. if (parseFloat(phxs22) < 40 || parseFloat(phxs22) > 50) {
  2788. addstrtip("第31项平衡系数(2)测量数据显示结果应为不符合!");
  2789. }
  2790. }
  2791. if (dat.JYJG68_JYJL31 === "×") {
  2792. if (parseFloat(phxs22) >= 40 && parseFloat(phxs22) <= 50) {
  2793. addstrtip("第31项平衡系数(2)测量数据显示结果应为符合!");
  2794. }
  2795. }
  2796. if (dat.JYJG68_JYJL31 === "-") {
  2797. addstrtip("第31项平衡系数(2)测量数据与结果矛盾!");
  2798. }
  2799. if (dat.JYJG68_JYJL31 === "×") {
  2800. const rs32_34 =
  2801. dat.JYJG69_JYJL32 !== "-" ||
  2802. dat.JYJG70_JYJL33 !== "-" ||
  2803. dat.JYJG71_JYJL33 !== "-" ||
  2804. dat.JYJG72_JYJL34 !== "-" ||
  2805. dat.JYJG73_JYJL34 !== "-" ||
  2806. dat.JYJG74_JYJL34 !== "-" ||
  2807. dat.JYJG75_JYJL34 !== "-";
  2808. const rs35_39 =
  2809. dat.JYJG76_JYJL35 !== "-" ||
  2810. dat.JYJG77_JYJL36 !== "-" ||
  2811. dat.JYJG78_JYJL36 !== "-" ||
  2812. dat.JYJG79_JYJL38 !== "-" ||
  2813. dat.JYJG80_JYJL39 !== "-" ||
  2814. dat.JYJG81_JYJL39 !== "-" ||
  2815. dat.JYJG82_JYJL39 !== "-" ||
  2816. dat.JYJG83_JYJL39 !== "-";
  2817. const rs40_43 =
  2818. dat.JYJG84_JYJL40 !== "-" ||
  2819. dat.JYJG85_JYJL40 !== "-" ||
  2820. dat.JYJG86_JYJL40 !== "-" ||
  2821. dat.JYJG87_JYJL40 !== "-" ||
  2822. dat.JYJG88_JYJL41 !== "-" ||
  2823. dat.JYJG89_JYJL41 !== "-" ||
  2824. dat.JYJG90_JYJL42 !== "-" ||
  2825. dat.JYJG91_JYJL43 !== "-";
  2826. if (rs32_34 || rs35_39 || rs40_43) {
  2827. addstrtip("平衡系数不合格,第32-43项应为“-”!");
  2828. }
  2829. }
  2830. } else {
  2831. if (/^40-50$/.test(phxs22)) {
  2832. if (dat.JYJG68_JYJL31 === "×") {
  2833. addstrtip('第31项平衡系数(2)"40-50"表明结果应为符合!');
  2834. }
  2835. } else {
  2836. addstrtip("第31项平衡系数(2)测量数值格式错误!");
  2837. }
  2838. }
  2839. }
  2840. }
  2841. }
  2842. //39 上行超速保护
  2843. //"JYJG80_JYJL39":"","DTBZ80":"","JYJG81_JYJL39":"","DTBZ81":"","JYJG82_JYJL39":"","DTBZ82":"","JYJG83_JYJL39":"","DTBZ83":""
  2844. if (manufactureDate != null) {
  2845. if (manufactureDate < new Date(2004, 1, 1)) {
  2846. if (
  2847. dat.JYJG80_JYJL39 != "-" ||
  2848. dat.JYJG81_JYJL39 != "-" ||
  2849. dat.JYJG82_JYJL39 != "-" ||
  2850. dat.JYJG83_JYJL39 != "-"
  2851. ) {
  2852. addstrtip("注意2004.1.1之前生产的电梯,上行超速保护是否不检验!");
  2853. }
  2854. }
  2855. if (manufactureDate >= new Date(2004, 1, 1)) {
  2856. if (
  2857. dat.JYJG80_JYJL39 === "-" ||
  2858. dat.JYJG81_JYJL39 === "-" ||
  2859. dat.JYJG82_JYJL39 === "-" ||
  2860. dat.JYJG83_JYJL39 === "-"
  2861. ) {
  2862. addstrtip(
  2863. "注意2004.1.1之后生产的电梯,上行超速保护是否需要检验!"
  2864. );
  2865. }
  2866. }
  2867. }
  2868. //40-43
  2869. if (1) {
  2870. //40 轿厢意外移动
  2871. //40."JYJG84_JYJL40":"","DTBZ84":"","JYJG85_JYJL40":"","DTBZ85":"","JYJG86_JYJL40":"","DTBZ86":"","JYJG87_JYJL40":"","DTBZ87":""
  2872. if (manufactureDate != null) {
  2873. if (manufactureDate < new Date(2016, 7, 1)) {
  2874. if (
  2875. dat.JYJG84_JYJL40 != "-" ||
  2876. dat.JYJG85_JYJL40 != "-" ||
  2877. dat.JYJG86_JYJL40 != "-" ||
  2878. dat.JYJG87_JYJL40 != "-"
  2879. ) {
  2880. addstrtip(
  2881. "注意2016.7.1之前生产的电梯,轿厢意外移动是否不检验!"
  2882. );
  2883. }
  2884. }
  2885. if (manufactureDate >= new Date(2016, 7, 1)) {
  2886. if (
  2887. dat.JYJG84_JYJL40 === "-" ||
  2888. dat.JYJG85_JYJL40 === "-" ||
  2889. dat.JYJG86_JYJL40 === "-" ||
  2890. dat.JYJG87_JYJL40 === "-"
  2891. ) {
  2892. addstrtip(
  2893. "注意2016.7.1之后生产的电梯,轿厢意外移动是否需要检验!"
  2894. );
  2895. }
  2896. }
  2897. }
  2898. //42 125制动试验
  2899. //"JYJG90_JYJL42":"","DTBZ90":""
  2900. if (lastBrakingDate != null) {
  2901. if (lastBrakingDate.getFullYear() === new Date().getFullYear()) {
  2902. if (dat.JYJG90_JYJL42 === "-") {
  2903. addstrtip("最近制动试验是在今年,第42项应为符合!");
  2904. }
  2905. }
  2906. if (lastBrakingDate.getFullYear() != new Date().getFullYear()) {
  2907. if (dat.JYJG90_JYJL42 != "-") {
  2908. addstrtip("最近制动试验不在今年,第42项应为“-”!");
  2909. }
  2910. }
  2911. }
  2912. }
  2913. }
  2914. }
  2915. //显示提示信息
  2916. if (1) {
  2917. if (strtip.trim() === "") {
  2918. strtip = "未发现问题";
  2919. }
  2920.  
  2921. input.value = strtip + "\n\n" + strinput;
  2922. strtip = "";
  2923. strinput = "";
  2924. tipnum = 0;
  2925. }
  2926. }
  2927.  
  2928. function StringToDate(str) {
  2929. var strDate = str.split(" ");
  2930.  
  2931. var strDatepart = strDate[0].split("-");
  2932.  
  2933. var dtDate = new Date(strDatepart[0], strDatepart[1] - 1, strDatepart[2]);
  2934.  
  2935. return dtDate;
  2936. }
  2937. function YearMonthToYearMonthDay(str) {
  2938. if (str.length === 7) {
  2939. str = str.concat("-01");
  2940. }
  2941. return str.trim();
  2942. }
  2943. function ZifuchuanIsDate(strdate) {
  2944. //isNaN(strdate)返回为false则是日期格式;排除data为纯数字的情况(此处不考虑只有年份的日期,如‘2020)
  2945. if (isNaN(strdate) && !isNaN(Date.parse(strdate))) {
  2946. return true;
  2947. } else {
  2948. return false;
  2949. }
  2950. }
  2951.  
  2952. function addstrtip(str) {
  2953. strtip = strtip.concat("\n");
  2954. tipnum = tipnum + 1;
  2955. strtip = strtip.concat(tipnum.toString());
  2956. strtip = strtip.concat("、");
  2957. strtip = strtip.concat(str);
  2958. }
  2959. function isNormalInteger(str) {
  2960. var n = Math.floor(Number(str));
  2961.  
  2962. return n !== Infinity && String(n) === str && n >= 0;
  2963. }
  2964. function isValidSBDMFormat(text) {
  2965. // 完整的正则表达式,匹配格式:(3110|3120) + 数组中的值 + 2000到2100之间的年份 + 五位数字顺序号
  2966. const regex = /^(3110|3120)\d{6}(\d{4})\d{6}$/;
  2967. // 首先判断基本的格式匹配
  2968. if (regex.test(text)) {
  2969. const match = text.match(regex);
  2970. if (match) {
  2971. var year = parseInt(match[2], 10);
  2972. if (year >= 2000 && year <= 2100) {
  2973. return true;
  2974. } else {
  2975. return false;
  2976. }
  2977. }
  2978. } else {
  2979. return false;
  2980. }
  2981. }
  2982. // 解析日期,如果没有具体的日,则默认为月的第一天
  2983. function parseDate(dateStr) {
  2984. const dateRegex = /^(\d{4})年(\d{1,2})月(\d{1,2})?日?$/;
  2985. const match = dateStr.match(dateRegex);
  2986. if (!match) {
  2987. return null;
  2988. }
  2989. const year = parseInt(match[1], 10);
  2990. const month = parseInt(match[2], 10) - 1;
  2991. const day = match[3] ? parseInt(match[3], 10) : 1;
  2992. return new Date(year, month, day);
  2993. }
  2994. //根据监督检验日期验证某一年是检验还是检测,并给出该年具体检验检测日期
  2995. //接收一个监督检验日期字符串
  2996. function elevatorInspectionStr(supervisionDateStr, queryYear) {
  2997. const dateRegex = /^(\d{4})年(\d{1,2})月/; // 正则表达式用于解析年份和月份
  2998. const match = supervisionDateStr.match(dateRegex);
  2999. if (match) {
  3000. const supervisionYear = parseInt(match[1], 10);
  3001. const supervisionMonth = parseInt(match[2], 10);
  3002. const inspectionYears = [1, 4, 7, 9, 11, 13, 15]; // 检验规则年份
  3003. let inspectionDates = [];
  3004. // 生成检验日期
  3005. inspectionYears.forEach((year) => {
  3006. if (supervisionYear + year <= queryYear) {
  3007. inspectionDates.push(supervisionYear + year);
  3008. }
  3009. });
  3010. // 处理超过15年后每年都检验的情况
  3011. if (queryYear - supervisionYear > 15) {
  3012. for (let year = supervisionYear + 16; year <= queryYear; year++) {
  3013. inspectionDates.push(year);
  3014. }
  3015. }
  3016. // 判断查询年份需要的操作
  3017. if (inspectionDates.includes(queryYear)) {
  3018. return { result: "检验", year: queryYear, month: supervisionMonth };
  3019. } else {
  3020. return { result: "检测", year: queryYear, month: supervisionMonth };
  3021. }
  3022. } else {
  3023. return { result: "错误", year: 0, month: 0 };
  3024. }
  3025. }
  3026. //根据监督检验日期验证某一年是检验还是检测,并给出该年份后下次检验日期
  3027. //接收监督检验日期和验证日期date类对象
  3028. function elevatorInspection(supervisionDate, queryDate) {
  3029. if (supervisionDate >= queryDate) {
  3030. return { result: "错误", date: null };
  3031. }
  3032. if (
  3033. new Date(
  3034. queryDate.getFullYear(),
  3035. supervisionDate.getMonth(),
  3036. supervisionDate.getDate()
  3037. ) < new Date(2023, 3, 1)
  3038. ) {
  3039. // 输出结果
  3040. return {
  3041. result: "检验",
  3042. date: new Date(
  3043. queryDate.getFullYear() + 1,
  3044. supervisionDate.getMonth(),
  3045. supervisionDate.getDate()
  3046. ),
  3047. };
  3048. } else {
  3049. const supervisionYear = supervisionDate.getFullYear();
  3050. const supervisionMonth = supervisionDate.getMonth();
  3051. const queryYear = queryDate.getFullYear();
  3052. const inspectionIntervals = [1, 4, 7, 9, 11, 13, 15]; // 定期检验的间隔年份
  3053. let inspectionYears = new Set();
  3054. // 生成所有定期检验的年份
  3055. for (let year = supervisionYear; year <= queryYear + 15; year++) {
  3056. if (
  3057. year - supervisionYear > 15 ||
  3058. inspectionIntervals.includes(year - supervisionYear)
  3059. ) {
  3060. inspectionYears.add(year);
  3061. }
  3062. }
  3063. // 确定查询年份是否是检验年份
  3064. let inspectionStatus = inspectionYears.has(queryYear) ? "检验" : "检测";
  3065. // 计算下一次检验的年份
  3066. let nextInspectionYear = [...inspectionYears].find(
  3067. (year) => year > queryYear
  3068. );
  3069.  
  3070. // 创建下次检验日期的Date对象
  3071. let nextInspectionDate = nextInspectionYear
  3072. ? new Date(nextInspectionYear, supervisionMonth, 1)
  3073. : null;
  3074.  
  3075. // 输出结果
  3076. return { result: inspectionStatus, date: nextInspectionDate };
  3077. }
  3078. }
  3079. function isValidSYDJFormat(text) {
  3080. // 完整的正则表达式,匹配格式:(3110|3120) + 数组中的值 + 2000到2100之间的年份 + 五位数字顺序号
  3081. const regex = /^(3110|3120)\d{6}(\d{4})\d{6}$/;
  3082. // 首先判断基本的格式匹配
  3083. if (regex.test(text)) {
  3084. const match = text.match(regex);
  3085. if (match) {
  3086. var year = parseInt(match[2], 10);
  3087. if (year >= 2000 && year <= 2100) {
  3088. return true;
  3089. } else {
  3090. return false;
  3091. }
  3092. }
  3093. } else {
  3094. return false;
  3095. }
  3096. }
  3097. function calculateBrakeDate(initialDate, queryDate) {
  3098. const brakeIntervalBefore2024 = 5; // 2024年4月1日之前的制动间隔
  3099. const brakeIntervalAfter2024 = 6; // 2024年4月1日及以后的制动间隔
  3100. let resultDate = new Date(initialDate.getTime());
  3101. let resultDatetemp = null;
  3102. let currentYear = 0;
  3103. while (resultDate <= queryDate) {
  3104. resultDatetemp = new Date(resultDate.getTime());
  3105. currentYear = resultDate.getFullYear();
  3106. // 如果检验日期在2013年1月1日之前,第一次制动日期是2018年
  3107. if (resultDate < new Date(2013, 0, 1)) {
  3108. resultDate.setFullYear(2018);
  3109. }
  3110. // 如果检验日期在2013年1月1日及之后,2019.4.1之前,第一次制动日期隔5年做
  3111. else if (resultDate < new Date(2019, 3, 1)) {
  3112. resultDate.setFullYear(currentYear + brakeIntervalBefore2024);
  3113. }
  3114. // 如果检验日期在2019年4月1日及之后,第一次制动日期隔6年做
  3115. else {
  3116. resultDate.setFullYear(currentYear + brakeIntervalAfter2024);
  3117. }
  3118. }
  3119. return resultDatetemp;
  3120. }
  3121.  
  3122. // 检查项目的键值对
  3123. function getXMKeyValues(jsonData, specificNumbers, symbolToCheck) {
  3124. const regex = /^JYJG(\d+)_JYJL(\d+)$/;
  3125. let validKeyValues = {};
  3126.  
  3127. for (let key in jsonData) {
  3128. const match = key.match(regex);
  3129. if (match) {
  3130. const value = jsonData[key];
  3131. const number = parseInt(match[2], 10);
  3132. if (value === symbolToCheck && specificNumbers.has(number)) {
  3133. validKeyValues[key] = value;
  3134. }
  3135. }
  3136. }
  3137.  
  3138. return validKeyValues;
  3139. }
  3140. // 检查键值对是否符合条件
  3141. function checkDTBZValues(jsonData) {
  3142. const regex = /^DTBZ(\d+)$/;
  3143. let results = [];
  3144.  
  3145. for (let key in jsonData) {
  3146. const match = key.match(regex);
  3147. if (match) {
  3148. const number = parseInt(match[1], 10);
  3149. if (number >= 1 && number <= 91) {
  3150. if (jsonData[key] !== "") {
  3151. results.push({ key, value: jsonData[key] });
  3152. }
  3153. }
  3154. }
  3155. }
  3156. return results;
  3157. }
  3158. // 封面前得到后
  3159. function getdtt(label) {
  3160. var labelEl = Array.from(document.getElementsByTagName("span")).find(
  3161. (el) => el.textContent === label
  3162. );
  3163. var widgetFieldEl = labelEl.parentElement;
  3164. while (!widgetFieldEl.classList.contains("widget-field")) {
  3165. widgetFieldEl = widgetFieldEl.parentElement;
  3166. }
  3167. return widgetFieldEl.nextElementSibling.innerText.trim();
  3168. }
  3169. // 表格前得到后
  3170. function gethtt(label) {
  3171. var labelEl = Array.from(document.getElementsByTagName("td")).find(
  3172. (el) => el.textContent.trim() === label
  3173. );
  3174. return labelEl.nextElementSibling.innerText.trim();
  3175. }
  3176. // 直接得到
  3177. function getdt(label) {
  3178. var labelEl = Array.from(document.getElementsByTagName("span")).find(
  3179. (el) => el.textContent === label
  3180. );
  3181. var widgetFieldEl = labelEl.parentElement;
  3182. while (!widgetFieldEl.classList.contains("widget-field")) {
  3183. widgetFieldEl = widgetFieldEl.parentElement;
  3184. }
  3185. return widgetFieldEl.innerText.trim();
  3186. }
  3187. // 获取表格对应值
  3188. function getht(label) {
  3189. var labelEl = Array.from(document.getElementsByTagName("td")).find(
  3190. (el) => el.textContent.trim() === label
  3191. );
  3192. return labelEl.innerText.trim();
  3193. }
  3194. // 假设这段HTML代码已经在页面上加载
  3195.  
  3196. // 定义一个函数来根据label的文本内容找到对应的span元素并获取其文本
  3197. function gett(labelText) {
  3198. // 使用XPath选择器来找到包含特定文本的label元素
  3199. var label = document.evaluate(
  3200. "//label[contains(., '" + labelText + "')]",
  3201. document,
  3202. null,
  3203. XPathResult.FIRST_ORDERED_NODE_TYPE,
  3204. null
  3205. ).singleNodeValue;
  3206.  
  3207. // 如果找到了label元素,则寻找它后面的span元素
  3208. if (label) {
  3209. var span = label.nextElementSibling; // 获取label元素的下一个兄弟元素
  3210. if (span && span.classList.contains("widget-content")) {
  3211. // 确保找到的元素是我们要的span
  3212. return span.textContent || span.innerText; // 获取span元素的文本内容
  3213. }
  3214. }
  3215. return null; // 如果没有找到,返回null
  3216. }
  3217. function replaceValuesWithFun(jn, fun) {
  3218. // 遍历JSON对象的所有键
  3219. for (var key in jn) {
  3220. if (jn.hasOwnProperty(key)) {
  3221. // 获取当前键对应的值
  3222. var value = jn[key];
  3223. // 使用提供的函数fun处理键名,并获取返回值
  3224. var funResult = fun(key);
  3225. // 如果fun返回的不是null,则用fun的返回值替换原值
  3226. if (funResult !== null) {
  3227. jn[key] = funResult;
  3228. }
  3229. }
  3230. }
  3231. // 返回修改后的JSON对象
  3232. return jn;
  3233. }
  3234. function validateAndExplainCode(input) {
  3235. // 正则表达式匹配形式“详见(JD101)号工具箱”,并仅提取最后两位数字
  3236. const regex =
  3237. /^详见((JD\d{1}\d{2}|SZSJD\d{2}|WZJD\d{2}|ZWJD\d{2}|GYJD\d{2}))号工具箱$/;
  3238. const match = input.match(regex);
  3239.  
  3240. if (!match) {
  3241. return { isValid: false, message: "输入格式不正确。" };
  3242. }
  3243.  
  3244. // 提取编码部分
  3245. const code = match[1];
  3246. let department = "";
  3247. // 只提取最后两位数字
  3248. let sequence = parseInt(code.slice(-2), 10); // 使用slice(-2)直接从字符串末尾取最后两个字符
  3249.  
  3250. // 根据编码解释其含义
  3251. if (/^JD1\d{2}$/.test(code)) {
  3252. department = "机电一部";
  3253. if (sequence > 10)
  3254. return { isValid: false, message: "机电一部顺序号超出范围。" };
  3255. } else if (/^JD2\d{2}$/.test(code)) {
  3256. department = "机电二部";
  3257. if (sequence < 1 || sequence > 4)
  3258. return { isValid: false, message: "机电二部顺序号超出范围。" };
  3259. } else if (/^JD3\d{2}$/.test(code)) {
  3260. department = "机电三部";
  3261. if (sequence > 8)
  3262. return { isValid: false, message: "机电三部顺序号超出范围。" };
  3263. } else if (/^SZSJD\d{2}$/.test(code)) {
  3264. department = "石嘴山分院";
  3265. if (sequence > 3)
  3266. return { isValid: false, message: "石嘴山分院顺序号超出范围。" };
  3267. } else if (/^WZJD\d{2}$/.test(code)) {
  3268. department = "吴忠分院";
  3269. if (sequence > 3)
  3270. return { isValid: false, message: "吴忠分院顺序号超出范围。" };
  3271. } else if (/^ZWJD\d{2}$/.test(code)) {
  3272. department = "中卫分院";
  3273. if (sequence > 3)
  3274. return { isValid: false, message: "中卫分院顺序号超出范围。" };
  3275. } else if (/^GYJD\d{2}$/.test(code)) {
  3276. department = "固原分院";
  3277. if (sequence > 3)
  3278. return { isValid: false, message: "固原分院顺序号超出范围。" };
  3279. } else {
  3280. return { isValid: false, message: "未知的编码部分。" };
  3281. }
  3282.  
  3283. return {
  3284. isValid: true,
  3285. message: `编码${code}表示${department},序号${sequence}。`,
  3286. };
  3287. }
  3288. function validateString(str) {
  3289. // 获取当前年份的后两位
  3290. const currentYearSuffix = new Date().getFullYear().toString().slice(-2);
  3291.  
  3292. // 正则表达式匹配中文全角或英文半角的小括号
  3293. const regex =
  3294. /^本记录第([\d+、,]+)项的检验结果为不符合使用单位已经承诺采取安全措施,对电梯实行监护使用(见编号为TZS-DT-${currentYearSuffix}\d{5}的《电梯检验意见通知书》)$/;
  3295. const match = str.match(regex);
  3296.  
  3297. if (!match) {
  3298. // 如果不匹配,直接返回false
  3299. return false;
  3300. }
  3301.  
  3302. // 提取并分割数字字符串
  3303. const numbersStr = match[1];
  3304. const numbers = numbersStr
  3305. .split(/[\d+、,]+/)
  3306. .filter((n) => n !== "")
  3307. .map(Number);
  3308.  
  3309. // 验证数字是否在1到43的范围内
  3310. const isValidNumbers = numbers.every((num) => num >= 1 && num <= 43);
  3311.  
  3312. // 验证XX4是否符合格式
  3313. const xx4Match = str.match(/TZS-DT-${currentYearSuffix}(\d{5})/);
  3314. const isValidXX4 = xx4Match && xx4Match[1].length === 5;
  3315.  
  3316. // 返回最终验证结果
  3317. return isValidNumbers && isValidXX4;
  3318. }
  3319. //不符合项序号也验证
  3320. function validateString1(str, ssz) {
  3321. // 将数组 ssz 转换成字符串并用顿号连接,同时支持中文和英文逗号
  3322. const items = ssz.join("[、,]");
  3323. // 构建正则表达式的动态部分,用于匹配 "第XX1、XX2、XX3项"
  3324. const itemPattern = `第${items}项`;
  3325. // 获取当前年份的最后两位
  3326. const year = new Date().getFullYear().toString().slice(-2);
  3327. // 定义正则表达式,匹配整个字符串
  3328. // 注意:此处假设XX4的格式是 "TZS-DT-" 后跟 7 位数字,其中前两位是年份
  3329. // 添加对中英文小括号的支持
  3330. const regex = new RegExp(
  3331. `^本记录${itemPattern}的检验结果为不符合[,,]使用单位已经承诺采取安全措施[,,]对电梯实行监护使用[((]见编号为TZS-DT-${year}\\d{5}的《电梯检验意见通知书》[))]$`
  3332. );
  3333. // 测试字符串是否符合正则表达式
  3334. return regex.test(str);
  3335. }
  3336. //通过全国统一社会信用代码得到所在省份名称
  3337. function getProvinceByKeyValue(code, jsonData) {
  3338. // 确保字符串长度为18
  3339. if (code.length !== 18) {
  3340. return "";
  3341. }
  3342.  
  3343. // 获取第3到4位的子字符串
  3344. const keyValue = code.substring(2, 4);
  3345.  
  3346. // 查找qg对象中对应的键名
  3347. for (const province in jsonData) {
  3348. if (jsonData[province] === keyValue) {
  3349. return province; // 返回找到的键名(省份名)
  3350. }
  3351. }
  3352.  
  3353. // 如果没有找到对应的键,返回错误信息
  3354. return "";
  3355. }
  3356. //对全国统一社会信用代码进行校验,有问题,和实际计算有差异
  3357. function isValidUnifiedSocialCreditCode(code) {
  3358. // 权重数组
  3359. const weights = [
  3360. 1, 3, 9, 27, 19, 26, 16, 17, 20, 29, 25, 13, 8, 24, 10, 30, 28,
  3361. ];
  3362. // 校验码对应表
  3363. const checkCodes = "0123456789ABCDEFGHJKLMNPQRTUWXY";
  3364. // 字符到数字的映射,大写字母按照顺序映射,不包括I、O、S、V、Z
  3365. const charToNumberMap = {
  3366. A: 10,
  3367. B: 11,
  3368. C: 12,
  3369. D: 13,
  3370. E: 14,
  3371. F: 15,
  3372. G: 16,
  3373. H: 17,
  3374. J: 18,
  3375. K: 19,
  3376. L: 20,
  3377. M: 21,
  3378. N: 22,
  3379. P: 23,
  3380. Q: 24,
  3381. R: 25,
  3382. T: 26,
  3383. U: 27,
  3384. W: 28,
  3385. X: 29,
  3386. Y: 30,
  3387. };
  3388.  
  3389. // 确保统一社会信用代码长度为18位
  3390. if (code.length !== 18) {
  3391. return false;
  3392. }
  3393.  
  3394. // 计算加权和
  3395. let sum = 0;
  3396. for (let i = 0; i < 17; i++) {
  3397. const char = code.charAt(i);
  3398. let charCode;
  3399. if (!isNaN(char)) {
  3400. // 如果是数字,直接转换
  3401. charCode = parseInt(char, 10);
  3402. } else {
  3403. // 如果是字母,通过映射转换
  3404. charCode = charToNumberMap[char];
  3405. if (charCode === undefined) {
  3406. // 如果字母不在映射中(如I、O、S、V、Z),则代码无效
  3407. return false;
  3408. }
  3409. }
  3410. sum += charCode * weights[i];
  3411. }
  3412.  
  3413. // 计算校验码
  3414. const remainder = sum % 31;
  3415. const expectedCheckCode = checkCodes.charAt(remainder);
  3416.  
  3417. // 校验最后一位是否匹配
  3418. const actualCheckCode = code.charAt(17).toUpperCase();
  3419. return expectedCheckCode === actualCheckCode;
  3420. }
  3421. // 函数用于判断18位字符串中第3到8位是否是nx对象中某个键的值,并返回对应的键名
  3422. function findKeyFromCode(str, jsonData) {
  3423. // 将给定字符串中的第3到8位提取出来
  3424. var code = str.substr(2, 6);
  3425. // 循环遍历 JSON 数据,查找匹配的键名
  3426. for (var key in jsonData) {
  3427. if (jsonData.hasOwnProperty(key)) {
  3428. if (jsonData[key] === code) {
  3429. return key;
  3430. }
  3431. }
  3432. }
  3433.  
  3434. // 如果没有找到匹配的键名,返回空字符串
  3435. return "";
  3436. }
  3437.  
  3438. function checkRegionContainment(a, b) {
  3439. // 检查b是否直接是a
  3440. if (a === b) {
  3441. return true;
  3442. }
  3443.  
  3444. // 寻找a和b所在的最高级区域
  3445. const aRegion = findRegion(a, regions);
  3446. const bRegion = findRegion(b, regions);
  3447.  
  3448. if (!aRegion || !bRegion) {
  3449. return false; // 如果a或b没有找到对应的区域,返回false
  3450. }
  3451.  
  3452. // 判断b所在的区域是否包含a所在的区域
  3453. return isInRegion(a, b, regions);
  3454. }
  3455.  
  3456. // 递归地在regions中查找key所在的区域
  3457. function findRegion(key, region) {
  3458. if (region.hasOwnProperty(key)) {
  3459. return region; // 如果找到了key,返回包含它的区域对象
  3460. }
  3461.  
  3462. // 遍历当前区域的所有子区域
  3463. for (const subKey in region) {
  3464. if (region[subKey] instanceof Object) {
  3465. const result = findRegion(key, region[subKey]);
  3466. if (result) return result;
  3467. }
  3468. }
  3469. return null; // 如果没有找到,返回null
  3470. }
  3471. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址