DFDJLAdjfldjg

you can use it for your report

当前为 2024-04-25 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.cn-greasyfork.org/scripts/493430/1365916/DFDJLAdjfldjg.js

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