ztxkui 4.2.18-21 → 4.2.18-220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/dist/App.js +315 -291
  2. package/dist/Demo.js +64 -43
  3. package/dist/DemoCom/BasicDemo.js +57 -56
  4. package/dist/DemoCom/CodeQueryDemo.js +3 -2
  5. package/dist/DemoCom/CollapseDemo.js +28 -27
  6. package/dist/DemoCom/DragSort.js +11 -10
  7. package/dist/DemoCom/FormDemo.js +36 -30
  8. package/dist/DemoCom/PrintContainerDemo.js +151 -150
  9. package/dist/DemoCom/PrintDemo.js +15 -14
  10. package/dist/DemoCom/SinaturesDemo.js +9 -8
  11. package/dist/DemoCom/SyhDemo.js +21 -20
  12. package/dist/DemoCom/TableAnalyse.js +34 -33
  13. package/dist/DemoCom/TableDemo.js +73 -69
  14. package/dist/DemoCom/TableDemo1.js +84 -34
  15. package/dist/DemoCom/TableDetail.d.ts +9 -0
  16. package/dist/DemoCom/TableDetail.js +259 -0
  17. package/dist/DemoCom/TestCom.js +22 -19
  18. package/dist/DemoCom/data.d.ts +110 -0
  19. package/dist/DemoCom/data.js +2308 -0
  20. package/dist/TableDemo/BasicTable.js +225 -25
  21. package/dist/TableDemo/EditableTable.js +146 -72
  22. package/dist/TableDemo/ModalTable.js +25 -24
  23. package/dist/TableDemo/ProEditableTable.js +30 -29
  24. package/dist/TableDemo/data.d.ts +34 -0
  25. package/dist/TableDemo/data.js +387 -10
  26. package/dist/TableDemo/index.js +3 -3
  27. package/dist/TreeDemo.js +8 -7
  28. package/dist/TreeSelectDemo.js +12 -8
  29. package/dist/UI/Form/index.d.ts +3 -0
  30. package/dist/UI/Form/index.js +347 -0
  31. package/dist/UI/Input/index.d.ts +17 -0
  32. package/dist/UI/Input/index.js +74 -0
  33. package/dist/UI/InputNumber/index.d.ts +3 -0
  34. package/dist/UI/InputNumber/index.js +45 -0
  35. package/dist/UI/OldForm/index.d.ts +9 -0
  36. package/dist/UI/OldForm/index.js +302 -0
  37. package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
  38. package/dist/UI/Select/EmpForQuitDemo.js +120 -0
  39. package/dist/UI/Select/index.d.ts +10 -0
  40. package/dist/UI/Select/index.js +207 -0
  41. package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
  42. package/dist/UI/Table/BusinessListDemo.js +227 -0
  43. package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
  44. package/dist/UI/Table/BusinessMemberDemo.js +181 -0
  45. package/dist/UI/Table/index.d.ts +10 -0
  46. package/dist/UI/Table/index.js +850 -0
  47. package/dist/UI/TreeSelect/index.d.ts +3 -0
  48. package/dist/UI/TreeSelect/index.js +120 -0
  49. package/dist/UI/index.d.ts +2 -0
  50. package/dist/UI/index.js +34 -0
  51. package/dist/UploadDemo.js +27 -23
  52. package/dist/components/Button/button.d.ts +6 -0
  53. package/dist/components/Button/button.js +11 -4
  54. package/dist/components/Collapse/collapse.js +2 -1
  55. package/dist/components/DatePicker/data-picker.d.ts +3 -1
  56. package/dist/components/EnhanceSelect/index.d.ts +11 -1
  57. package/dist/components/EnhanceSelect/index.js +231 -49
  58. package/dist/components/EnhanceTree/index.js +4 -3
  59. package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
  60. package/dist/components/EnhanceTreeSelect/index.js +57 -7
  61. package/dist/components/Export/export.js +5 -4
  62. package/dist/components/Form/form.d.ts +11 -1
  63. package/dist/components/Form/form.js +5 -3
  64. package/dist/components/Input/input.d.ts +5 -3
  65. package/dist/components/Input/input.js +72 -3
  66. package/dist/components/InputNumber/input-number.js +3 -2
  67. package/dist/components/Layout/layout.d.ts +4 -4
  68. package/dist/components/Menu/menu.d.ts +1 -1
  69. package/dist/components/NumberCase/index.js +9 -7
  70. package/dist/components/Print/print.js +4 -3
  71. package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
  72. package/dist/components/PrintContainer/PrintModal.js +4 -3
  73. package/dist/components/PrintContainer/handle.d.ts +2 -4
  74. package/dist/components/PrintContainer/handle.js +3 -2
  75. package/dist/components/PrintContainer/lodop.js +2 -1
  76. package/dist/components/PrintContainer/print-container.js +74 -73
  77. package/dist/components/PrintContainer/service.js +5 -4
  78. package/dist/components/ProForm/hooks.d.ts +23 -0
  79. package/dist/components/ProForm/hooks.js +209 -0
  80. package/dist/components/ProForm/index.d.ts +9 -0
  81. package/dist/components/ProForm/index.js +168 -0
  82. package/dist/components/ProForm/interface.d.ts +200 -0
  83. package/dist/components/ProForm/interface.js +1 -0
  84. package/dist/components/ProForm/item.d.ts +13 -0
  85. package/dist/components/ProForm/item.js +222 -0
  86. package/dist/components/ProForm/items.d.ts +5 -0
  87. package/dist/components/ProForm/items.js +36 -0
  88. package/dist/components/ProForm/record-common-list.d.ts +18 -0
  89. package/dist/components/ProForm/record-common-list.js +83 -0
  90. package/dist/components/ProForm/search-drawer.d.ts +14 -0
  91. package/dist/components/ProForm/search-drawer.js +237 -0
  92. package/dist/components/ProForm/setting.d.ts +5 -0
  93. package/dist/components/ProForm/setting.js +12 -0
  94. package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
  95. package/dist/components/ProForm/useCommonSearch.js +352 -0
  96. package/dist/components/ProFormList/index.d.ts +12 -0
  97. package/dist/components/ProFormList/index.js +34 -0
  98. package/dist/components/RangePicker/range-picker.js +5 -2
  99. package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
  100. package/dist/components/SortableCancel/sortable-cancel.js +2 -2
  101. package/dist/components/Table/components/FillDown.js +2 -1
  102. package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
  103. package/dist/components/Table/components/FilterDropdown.js +36 -12
  104. package/dist/components/Table/hooks/useColumns.d.ts +5 -0
  105. package/dist/components/Table/hooks/useColumns.js +396 -22
  106. package/dist/components/Table/hooks/useDropRef.js +2 -1
  107. package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
  108. package/dist/components/Table/hooks/useScuRfresh.js +22 -0
  109. package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
  110. package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
  111. package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
  112. package/dist/components/Table/index.d.ts +4 -0
  113. package/dist/components/Table/table-adddel-column.js +4 -3
  114. package/dist/components/Table/table-dynamic.d.ts +1 -0
  115. package/dist/components/Table/table-dynamic.js +447 -60
  116. package/dist/components/Table/table-enhance-cell.d.ts +3 -0
  117. package/dist/components/Table/table-enhance-cell.js +28 -8
  118. package/dist/components/Table/table-menu.d.ts +7 -0
  119. package/dist/components/Table/table-menu.js +359 -0
  120. package/dist/components/Table/table-resizable-title.js +1 -0
  121. package/dist/components/Table/table-sort.js +4 -3
  122. package/dist/components/Table/table.d.ts +16 -0
  123. package/dist/components/Table/table.js +241 -65
  124. package/dist/components/Table/utils/dom.js +2 -1
  125. package/dist/components/Table/utils/filterHandle.d.ts +1 -1
  126. package/dist/components/Table/utils/filterHandle.js +27 -12
  127. package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
  128. package/dist/components/Table/utils/getSummaryData.js +279 -24
  129. package/dist/components/Table/utils/shallowEqual.js +2 -1
  130. package/dist/components/Table/utils/validate.js +25 -6
  131. package/dist/components/Tabs/tabs.d.ts +2 -0
  132. package/dist/components/Tabs/tabs.js +3 -1
  133. package/dist/components/TranslationButton/DownFile.d.ts +7 -0
  134. package/dist/components/TranslationButton/DownFile.js +95 -0
  135. package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
  136. package/dist/components/TranslationButton/PreviewFile.js +73 -0
  137. package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
  138. package/dist/components/TranslationButton/TranslationButton.js +245 -0
  139. package/dist/components/TranslationButton/hooks.d.ts +8 -0
  140. package/dist/components/TranslationButton/hooks.js +139 -0
  141. package/dist/components/TranslationButton/index.d.ts +4 -0
  142. package/dist/components/TranslationButton/index.js +4 -0
  143. package/dist/components/TreeSelect/index.d.ts +19 -0
  144. package/dist/components/TreeSelect/index.js +88 -0
  145. package/dist/components/Upload/upload-table.js +31 -26
  146. package/dist/components/Upload/upload.d.ts +20 -1
  147. package/dist/components/Upload/upload.js +172 -27
  148. package/dist/components/Upload/utils.d.ts +9 -2
  149. package/dist/components/Upload/utils.js +153 -38
  150. package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
  151. package/dist/components/UploadCustom/hooks/useDg.js +55 -0
  152. package/dist/components/UploadSingle/upload-single.js +5 -4
  153. package/dist/components/Watermark/index.d.ts +2 -0
  154. package/dist/components/Watermark/index.js +2 -0
  155. package/dist/components/Watermark/interface.d.ts +20 -0
  156. package/dist/components/Watermark/interface.js +1 -0
  157. package/dist/components/Watermark/utils.d.ts +1 -0
  158. package/dist/components/Watermark/utils.js +70 -0
  159. package/dist/components/Watermark/water.d.ts +50 -0
  160. package/dist/components/Watermark/water.js +66 -0
  161. package/dist/components/Watermark/watermark-div.d.ts +4 -0
  162. package/dist/components/Watermark/watermark-div.js +41 -0
  163. package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
  164. package/dist/components/Watermark/watermark-shadow.js +116 -0
  165. package/dist/components/Watermark/watermark.d.ts +3 -0
  166. package/dist/components/Watermark/watermark.js +102 -0
  167. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
  168. package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
  169. package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
  170. package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
  171. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
  172. package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
  173. package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
  174. package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
  175. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
  176. package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
  177. package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
  178. package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
  179. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
  180. package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
  181. package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
  182. package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
  183. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
  184. package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
  185. package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
  186. package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
  187. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
  188. package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
  189. package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
  190. package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
  191. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
  192. package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
  193. package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
  194. package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
  195. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
  196. package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
  197. package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
  198. package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
  199. package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
  200. package/dist/components/WorkflowPrintContainer/images.js +2 -0
  201. package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
  202. package/dist/components/WorkflowPrintContainer/index.js +2 -0
  203. package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
  204. package/dist/components/WorkflowPrintContainer/service.js +101 -0
  205. package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
  206. package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
  207. package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
  208. package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
  209. package/dist/components/ZtIcon/index.js +2 -0
  210. package/dist/components/business/Analyse/index.js +12 -11
  211. package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
  212. package/dist/components/business/CodeQuery/component/TableList.js +5 -4
  213. package/dist/components/business/CodeQuery/hooks.js +2 -1
  214. package/dist/components/business/CodeQuery/index.js +2 -1
  215. package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
  216. package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
  217. package/dist/components/business/Common/UserInfo/index.js +5 -4
  218. package/dist/components/business/Common/UserPassword/index.js +14 -11
  219. package/dist/components/business/Common/validatePassword.d.ts +1 -1
  220. package/dist/components/business/Common/validatePassword.js +17 -7
  221. package/dist/components/business/DetailCard/index.js +7 -6
  222. package/dist/components/business/DetailHeader/index.js +7 -6
  223. package/dist/components/business/DetailList/index.js +5 -4
  224. package/dist/components/business/DgColumns/index.js +12 -11
  225. package/dist/components/business/ExportButton/index.js +6 -5
  226. package/dist/components/business/Footer/index.js +4 -1
  227. package/dist/components/business/GridList/item.d.ts +1 -1
  228. package/dist/components/business/List/item.d.ts +1 -1
  229. package/dist/components/business/NewList/item.d.ts +1 -1
  230. package/dist/components/business/NewList/item.js +1 -1
  231. package/dist/components/business/OperationBtnGroup/index.js +17 -16
  232. package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
  233. package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
  234. package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
  235. package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
  236. package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
  237. package/dist/components/business/SearchContainer/record-common-item.js +83 -0
  238. package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
  239. package/dist/components/business/SearchContainer/record-common-list.js +95 -0
  240. package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
  241. package/dist/components/business/SearchContainer/search-container.js +66 -3
  242. package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
  243. package/dist/components/business/SearchContainer/search-drawer.js +167 -13
  244. package/dist/components/business/SearchContainer/search-item.js +48 -5
  245. package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
  246. package/dist/components/business/SearchContainer/search-left.js +105 -68
  247. package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
  248. package/dist/components/business/SearchContainer/search-right.js +62 -5
  249. package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
  250. package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
  251. package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
  252. package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
  253. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
  254. package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
  255. package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
  256. package/dist/components/business/SearchContainer/useTemplate.js +347 -0
  257. package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
  258. package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
  259. package/dist/components/business/Signatures/components/CodeModal.js +157 -0
  260. package/dist/components/business/Signatures/components/CompareResult.js +7 -6
  261. package/dist/components/business/Signatures/components/DetailTable.js +37 -34
  262. package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
  263. package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
  264. package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
  265. package/dist/components/business/Signatures/index.js +64 -53
  266. package/dist/components/business/SortList/sort-drawer.js +5 -4
  267. package/dist/components/business/Template/index.js +11 -10
  268. package/dist/components/electron-signatures/content.d.ts +9 -0
  269. package/dist/components/electron-signatures/content.js +1146 -0
  270. package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
  271. package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
  272. package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
  273. package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
  274. package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
  275. package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
  276. package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
  277. package/dist/components/electron-signatures/demoComponents/index.js +30 -0
  278. package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
  279. package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
  280. package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
  281. package/dist/components/electron-signatures/demoComponents/making.js +211 -0
  282. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
  283. package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
  284. package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
  285. package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
  286. package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
  287. package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
  288. package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
  289. package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
  290. package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
  291. package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
  292. package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
  293. package/dist/components/electron-signatures/demoComponents/test.js +119 -0
  294. package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
  295. package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
  296. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
  297. package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
  298. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
  299. package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
  300. package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
  301. package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
  302. package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
  303. package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
  304. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
  305. package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
  306. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
  307. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
  308. package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
  309. package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
  310. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
  311. package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
  312. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
  313. package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
  314. package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
  315. package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
  316. package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
  317. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
  318. package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
  319. package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
  320. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
  321. package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
  322. package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
  323. package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
  324. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
  325. package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
  326. package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
  327. package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
  328. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
  329. package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
  330. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
  331. package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
  332. package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
  333. package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
  334. package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
  335. package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
  336. package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
  337. package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
  338. package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
  339. package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
  340. package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
  341. package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
  342. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
  343. package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
  344. package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
  345. package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
  346. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
  347. package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
  348. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
  349. package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
  350. package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
  351. package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
  352. package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
  353. package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
  354. package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
  355. package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
  356. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
  357. package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
  358. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
  359. package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
  360. package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
  361. package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
  362. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
  363. package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
  364. package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
  365. package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
  366. package/dist/components/electron-signatures/index.d.ts +15 -0
  367. package/dist/components/electron-signatures/index.js +63 -0
  368. package/dist/components/electron-signatures/interface.d.ts +865 -0
  369. package/dist/components/electron-signatures/interface.js +57 -0
  370. package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
  371. package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
  372. package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
  373. package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
  374. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
  375. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
  376. package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
  377. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
  378. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
  379. package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
  380. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
  381. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
  382. package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
  383. package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
  384. package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
  385. package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
  386. package/dist/components/electron-signatures/utils.d.ts +26 -0
  387. package/dist/components/electron-signatures/utils.js +67 -0
  388. package/dist/components/utils/MyStorage.d.ts +36 -0
  389. package/dist/components/utils/MyStorage.js +120 -0
  390. package/dist/components/utils/ZtxkContext.d.ts +67 -0
  391. package/dist/components/utils/ZtxkContext.js +20 -0
  392. package/dist/components/utils/checkSealCoUse.d.ts +16 -0
  393. package/dist/components/utils/checkSealCoUse.js +83 -0
  394. package/dist/components/utils/fetch.d.ts +10 -0
  395. package/dist/components/utils/fetch.js +119 -0
  396. package/dist/components/utils/index.d.ts +9 -0
  397. package/dist/components/utils/index.js +11 -0
  398. package/dist/components/utils/processNumber.d.ts +12 -0
  399. package/dist/components/utils/processNumber.js +106 -0
  400. package/dist/components/utils/upload.js +6 -3
  401. package/dist/components/utils/useBaseContext.d.ts +23 -0
  402. package/dist/components/utils/useBaseContext.js +31 -0
  403. package/dist/components/utils/useMemoizedFn.d.ts +4 -0
  404. package/dist/components/utils/useMemoizedFn.js +19 -0
  405. package/dist/components/utils/usePrevious.d.ts +3 -0
  406. package/dist/components/utils/usePrevious.js +13 -0
  407. package/dist/constants.d.ts +1 -1
  408. package/dist/constants.js +1 -1
  409. package/dist/index.css +2205 -58
  410. package/dist/index.css.map +1 -1
  411. package/dist/index.d.ts +12 -1
  412. package/dist/index.js +255 -86
  413. package/dist/locales/en-US.json +828 -0
  414. package/dist/locales/zh-CN.json +828 -0
  415. package/dist/request.js +7 -6
  416. package/package.json +13 -4
@@ -0,0 +1,1146 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (_) try {
28
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ var __rest = (this && this.__rest) || function (s, e) {
49
+ var t = {};
50
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
51
+ t[p] = s[p];
52
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
53
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
54
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
55
+ t[p[i]] = s[p[i]];
56
+ }
57
+ return t;
58
+ };
59
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
60
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
61
+ to[j] = from[i];
62
+ return to;
63
+ };
64
+ import i18next from 'ztxkutils/dist/i18next';
65
+ import React, { memo, useMemo, useState, useImperativeHandle, useRef, useEffect, createContext, } from 'react';
66
+ import { Table } from 'antd';
67
+ import useBaseContext from '../utils/useBaseContext';
68
+ import { Modal, message, Button } from '../../index';
69
+ import ElectronSignaturesFragment from './electron-signatures-fragment';
70
+ import useMemoizedFn from '../utils/useMemoizedFn';
71
+ import checkSealCoUse from '../utils/checkSealCoUse';
72
+ import useMergeRecords from './hooks/useMergeRecords';
73
+ // 附件相关
74
+ import useFileTypeColumns from './fileComponents/useFileTypeColumns';
75
+ import useFileColumns from './fileComponents/useFileColumns';
76
+ // 电子印章相关
77
+ import useElectronColumns from './electronComponents/useElectronColumns';
78
+ import ElectronSealBatchDownload from './electronComponents/electron-seal-batch-download';
79
+ import useCheckedSealInfoList from './electronComponents/useCheckedSealInfoList';
80
+ import LastQysModal from './electronComponents/last-qys-modal';
81
+ // 群杰相关
82
+ import useQunjColumns from './qunjComponents/useQunjColumns';
83
+ // 达观合同比对
84
+ import useContractColumns from './dgComponents/useContractColumns';
85
+ import FileComparisonBtn from './dgComponents/file-comparison-btn';
86
+ // 翻译组件
87
+ import useTranslateCom from './translateComponents/useTranslateCom';
88
+ import useDg from '../UploadCustom/hooks/useDg';
89
+ import { FLOW_IDS, currentRecordIsOnlyQunj } from './utils';
90
+ import { countIsValidate } from './hooks/useParseQunjListData';
91
+ import FileUpload from './fileComponents/file-upload';
92
+ import { DATA_TYPE_KEY } from './hooks/useParseRecords';
93
+ import useGetDeptInfo from './electronComponents/useGetDeptInfo';
94
+ import dayjs from 'dayjs';
95
+ import isEqual from 'lodash/isEqual';
96
+ import useGetQjVerifyCode from './hooks/useGetQjVerifyCode';
97
+ export var ElectronSignaturesContext = createContext({
98
+ isNewQys: true,
99
+ isQjVerifyCode: true,
100
+ });
101
+ /**
102
+ * 一开始这个组件想设计成 可以传入多中类型的数据 但是发现这种做法会有很多问题
103
+ * 不同的数据类型 共享一个表头 那么其实这样就做不到隐藏某些表头的效果
104
+ */
105
+ var ElectronSignatures = function (props) {
106
+ var _a, _b, _c;
107
+ var request = props.request, isTranslation = props.isTranslation, previewUrl = props.previewUrl, _d = props.isUnControlled, isUnControlled = _d === void 0 ? true : _d, _e = props.contractNumFlowIds, contractNumFlowIds = _e === void 0 ? FLOW_IDS : _e, fileUploadProps = props.fileUploadProps, isShowFileUpload = props.isShowFileUpload, isShowFileUploadIndependence = props.isShowFileUploadIndependence, otherOptions = props.otherOptions, _fileBaseUrl = props.fileBaseUrl, _apiBaseUrl = props.apiBaseUrl, electronHandleRef = props.electronHandleRef, _onValueChange = props.onValueChange, isValidateSuccess = props.isValidateSuccess, refreshCode = props.refreshCode, onCheckedComparison = props.onCheckedComparison, _onFileTypeChangeGetItem = props.onFileTypeChangeGetItem, tableScroll = props.tableScroll, _getCreateTimeHand = props.getCreateTimeHand, isShowElectronBatchBtn = props.isShowElectronBatchBtn, isShowDownloadBatchBtn = props.isShowDownloadBatchBtn, isShowBatchDeleteBtn = props.isShowBatchDeleteBtn, isShowBatchDeleteBtnIndependence = props.isShowBatchDeleteBtnIndependence, beforeBatchDelete = props.beforeBatchDelete, isShowBatchPreviewBtn = props.isShowBatchPreviewBtn, isShowFileComparisonBtn = props.isShowFileComparisonBtn, batchDownloadZipName = props.batchDownloadZipName, isShowDoubleSignedBatchBtn = props.isShowDoubleSignedBatchBtn, _f = props.isShowFileType, isShowFileType = _f === void 0 ? true : _f, _g = props.isShowFileTypeMerge, isShowFileTypeMerge = _g === void 0 ? true : _g,
108
+ // fmsIsElectronicSealLabel = '产业链综合服务平台-客户电子签章',
109
+ _h = props.fmsIsElectronicSealLabel,
110
+ // fmsIsElectronicSealLabel = '产业链综合服务平台-客户电子签章',
111
+ fmsIsElectronicSealLabel = _h === void 0 ? i18next.t('加盖产融章') : _h,
112
+ // fmsIsElectronicSealPushLabel = '推送银行',
113
+ _j = props.fmsIsElectronicSealPushLabel,
114
+ // fmsIsElectronicSealPushLabel = '推送银行',
115
+ fmsIsElectronicSealPushLabel = _j === void 0 ? i18next.t('加盖银行签章') : _j, _k = props.openingContractSealLabel, openingContractSealLabel = _k === void 0 ? i18next.t('盖光盈电子章') : _k, isSingleQj = props.isSingleQj, _l = props.isQjUseModal, isQjUseModal = _l === void 0 ? true : _l, defaultJustNeedQj = props.defaultJustNeedQj, isDeleteAllFileWhenJustUseQj = props.isDeleteAllFileWhenJustUseQj, _m = props.isShowQysWhenNeedNotQys, isShowQysWhenNeedNotQys = _m === void 0 ? true : _m, _o = props.isControlNeedQys, isControlNeedQys = _o === void 0 ? true : _o, isDeletePlaceholderFileData = props.isDeletePlaceholderFileData, isSupportNoAttachQj = props.isSupportNoAttachQj, caseId = props.caseId, _p = props.isChoiseChangeTemplateValid, isChoiseChangeTemplateValid = _p === void 0 ? true : _p, _q = props.isToggleQys, isToggleQys = _q === void 0 ? false : _q, _r = props.isQjVerifyCode, isQjVerifyCode = _r === void 0 ? false : _r, _s = props.isNewQys, isNewQys = _s === void 0 ? false : _s, isNewElectronSealStyle = props.isNewElectronSealStyle, isNewQunjSealStyle = props.isNewQunjSealStyle, _t = props.isShowBatchUseElectronicSealBtn, isShowBatchUseElectronicSealBtn = _t === void 0 ? true : _t, isShowBatchUseOpeningContractSealBtn = props.isShowBatchUseOpeningContractSealBtn, isShowOpeningContractSeal = props.isShowOpeningContractSeal, customButtons = props.customButtons, goWorkflowSeal = props.goWorkflowSeal, isShowSealApply = props.isShowSealApply, otherColumns = props.otherColumns, isShowOpeningContractSealNotRelyQys = props.isShowOpeningContractSealNotRelyQys, isNoWatermarkProcess = props.isNoWatermarkProcess, qunjListRenderFilter = props.qunjListRenderFilter, sealDownloadFlowStatus = props.sealDownloadFlowStatus, resetProps = __rest(props, ["request", "isTranslation", "previewUrl", "isUnControlled", "contractNumFlowIds", "fileUploadProps", "isShowFileUpload", "isShowFileUploadIndependence", "otherOptions", "fileBaseUrl", "apiBaseUrl", "electronHandleRef", "onValueChange", "isValidateSuccess", "refreshCode", "onCheckedComparison", "onFileTypeChangeGetItem", "tableScroll", "getCreateTimeHand", "isShowElectronBatchBtn", "isShowDownloadBatchBtn", "isShowBatchDeleteBtn", "isShowBatchDeleteBtnIndependence", "beforeBatchDelete", "isShowBatchPreviewBtn", "isShowFileComparisonBtn", "batchDownloadZipName", "isShowDoubleSignedBatchBtn", "isShowFileType", "isShowFileTypeMerge", "fmsIsElectronicSealLabel", "fmsIsElectronicSealPushLabel", "openingContractSealLabel", "isSingleQj", "isQjUseModal", "defaultJustNeedQj", "isDeleteAllFileWhenJustUseQj", "isShowQysWhenNeedNotQys", "isControlNeedQys", "isDeletePlaceholderFileData", "isSupportNoAttachQj", "caseId", "isChoiseChangeTemplateValid", "isToggleQys", "isQjVerifyCode", "isNewQys", "isNewElectronSealStyle", "isNewQunjSealStyle", "isShowBatchUseElectronicSealBtn", "isShowBatchUseOpeningContractSealBtn", "isShowOpeningContractSeal", "customButtons", "goWorkflowSeal", "isShowSealApply", "otherColumns", "isShowOpeningContractSealNotRelyQys", "isNoWatermarkProcess", "qunjListRenderFilter", "sealDownloadFlowStatus"]);
116
+ var selectRows = useRef(null);
117
+ // 批量更新时用于合并 onValueChange 调用,避免多次触发外部回调
118
+ var batchUpdateRef = useRef({
119
+ active: false,
120
+ data: {},
121
+ });
122
+ var onValueChange = useMemoizedFn(function (info) {
123
+ if (batchUpdateRef.current.active) {
124
+ // 批量模式:合并数据,延迟通知外部
125
+ Object.keys(info).forEach(function (key) {
126
+ batchUpdateRef.current.data[key] = __assign(__assign({}, batchUpdateRef.current.data[key]), info[key]);
127
+ });
128
+ return;
129
+ }
130
+ _onValueChange && _onValueChange(info);
131
+ });
132
+ /**
133
+ * 批量执行操作,期间的所有 onValueChange 调用会合并为一次外部通知。
134
+ * 适用于批量删除等会触发多次 onValueChange 的场景。
135
+ */
136
+ var batchOnValueChange = useMemoizedFn(function (fn) {
137
+ batchUpdateRef.current = { active: true, data: {} };
138
+ fn();
139
+ var batchedData = batchUpdateRef.current.data;
140
+ batchUpdateRef.current = { active: false, data: {} };
141
+ if (Object.keys(batchedData).length > 0) {
142
+ _onValueChange && _onValueChange(batchedData);
143
+ }
144
+ });
145
+ var onFileTypeChangeGetItem = useMemoizedFn(function (info) {
146
+ if (_onFileTypeChangeGetItem) {
147
+ return _onFileTypeChangeGetItem(info);
148
+ }
149
+ return __assign(__assign({}, info), { templateAttachId: undefined, templateAttachName: undefined, taskId: undefined });
150
+ });
151
+ var getCreateTimeHand = useMemoizedFn(function (record) {
152
+ // 这里方法有点问题做了下替换。后续看是否有问题
153
+ if (_getCreateTimeHand) {
154
+ return _getCreateTimeHand(record);
155
+ }
156
+ return record.createTime;
157
+ });
158
+ // 验证契约锁是否全部盖章
159
+ var getNoSealInfoList = useCheckedSealInfoList(request).getNoSealInfoList;
160
+ // 获得部门信息
161
+ var getDeptInfo = useGetDeptInfo(request).getDeptInfo;
162
+ // 达观操作
163
+ var _u = useDg(request), compareHandle = _u.compareHandle, lookCompareHandle = _u.lookCompareHandle;
164
+ // 存储当前点击的选择比对模板的一些参数
165
+ var dgInfoRef = useRef({});
166
+ var myCompareHandle = useMemoizedFn(function (templateId) {
167
+ return new Promise(function (resolve, reject) {
168
+ var _a = dgInfoRef.current, realIndex = _a.realIndex, attachId = _a.attachId, setRecords = _a.setRecords;
169
+ if (templateId && attachId) {
170
+ compareHandle(templateId, attachId)
171
+ .then(function (res) {
172
+ var _a, _b, _c;
173
+ if ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.taskId) {
174
+ setRecords(function (preRecords) {
175
+ var _a;
176
+ var copyRecords = preRecords.slice();
177
+ var item = copyRecords[realIndex];
178
+ copyRecords.splice(realIndex, 1, __assign(__assign({}, item), { taskId: (_a = res.data.data) === null || _a === void 0 ? void 0 : _a.taskId }));
179
+ return copyRecords;
180
+ });
181
+ resolve((_c = res.data.data) === null || _c === void 0 ? void 0 : _c.taskId);
182
+ }
183
+ else {
184
+ reject(i18next.t('调用合同比对接口失败'));
185
+ }
186
+ })
187
+ .catch(function (err) {
188
+ reject(err || i18next.t('调用合同比对接口失败'));
189
+ });
190
+ }
191
+ });
192
+ });
193
+ // 基础地址
194
+ var _v = useBaseContext(), API_BASE_URL = _v.apiBaseUrl, FILE_BASE_URL = _v.fileBaseUrl;
195
+ var apiBaseUrl = _apiBaseUrl || API_BASE_URL;
196
+ var fileBaseUrl = _fileBaseUrl || FILE_BASE_URL;
197
+ // 将配置分级处理
198
+ var allOptions = [];
199
+ // 有些流程可能会没有部门id,只有二级单元id。把他们两个作为一个或条件
200
+ // 对于那些没有传入部门数据和流程数据的参数统统干掉
201
+ // 这样会导致一个bug。那就是首次加载的时候,可能没有数据。但是后续又通过接口拿到了数据。
202
+ // 这里之前是不会有部门、流程的限制的。是因为用印流程他实际也是用了多个类型的附件,但是实际上
203
+ // 他不会有多个类型的附件。会导致多一个空行出来
204
+ if (Array.isArray(otherOptions)) {
205
+ var newOtherOptions = otherOptions.filter(function (item) {
206
+ return (item.deptId || item.secondDepId) && item.flowId ? true : false;
207
+ });
208
+ allOptions = __spreadArray([resetProps], newOtherOptions);
209
+ }
210
+ else if (otherOptions &&
211
+ ((otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.deptId) || (otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.secondDepId)) &&
212
+ (otherOptions === null || otherOptions === void 0 ? void 0 : otherOptions.flowId)) {
213
+ allOptions = [resetProps, otherOptions];
214
+ }
215
+ else {
216
+ allOptions = [resetProps];
217
+ }
218
+ // 根据收集到的流程id、权限人id列表,来判断是否请求群杰验证码数据
219
+ var _w = useGetQjVerifyCode({
220
+ allOptions: allOptions,
221
+ request: request,
222
+ isNewQys: isNewQys,
223
+ }), qjVerifyCodeData = _w.qjVerifyCodeData, getQjVerifyCodeHandle = _w.getQjVerifyCodeHandle;
224
+ /**
225
+ * 当前是否是编辑状态
226
+ */
227
+ var currentIsEditMemo = useMemo(function () {
228
+ return ((resetProps === null || resetProps === void 0 ? void 0 : resetProps.canEdit) + '' === '1' || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.canEdit) === true);
229
+ }, [resetProps.canEdit]);
230
+ // 表格是否处于loading中
231
+ var _x = useState(), loading = _x[0], setLoading = _x[1];
232
+ // 当前是否处于仅需要群杰印章的状态
233
+ var _y = useState(defaultJustNeedQj || false), justNeedQj = _y[0], setJustNeedQj = _y[1];
234
+ var _z = useState(''), organizationId = _z[0], setOrganizationId = _z[1];
235
+ /**
236
+ * 通过部门Id获得公司id
237
+ */
238
+ useEffect(function () {
239
+ var _deptId = resetProps.deptId;
240
+ // HR流程是行政组织,没有公司这一个概念
241
+ if (_deptId && !isNoWatermarkProcess) {
242
+ // 调用接口
243
+ getDeptInfo({
244
+ id: _deptId,
245
+ }).then(function (res) {
246
+ setOrganizationId((res === null || res === void 0 ? void 0 : res.companyId) || '');
247
+ });
248
+ }
249
+ // eslint-disable-next-line react-hooks/exhaustive-deps
250
+ }, [resetProps.deptId, isNoWatermarkProcess]);
251
+ useEffect(function () {
252
+ setJustNeedQj(defaultJustNeedQj || false);
253
+ }, [defaultJustNeedQj]);
254
+ // 记录下传入配置的顺序
255
+ // 这里做一下改造,将dataTypeSort作为一个动态变化的值来控制
256
+ var dataTypeString = (_c = (_b = (_a = allOptions === null || allOptions === void 0 ? void 0 : allOptions.map) === null || _a === void 0 ? void 0 : _a.call(allOptions, function (option, index) {
257
+ var dataType = option.dataType;
258
+ return dataType || "" + index;
259
+ })) === null || _b === void 0 ? void 0 : _b.join) === null || _c === void 0 ? void 0 : _c.call(_b, ',');
260
+ var dataTypeSort = useMemo(function () {
261
+ return allOptions.map(function (option, index) {
262
+ var dataType = option.dataType;
263
+ return dataType || "" + index;
264
+ });
265
+ // eslint-disable-next-line react-hooks/exhaustive-deps
266
+ }, [dataTypeString]);
267
+ // const [dataTypeSort] = useState<string[]>(() => {
268
+ // return allOptions.map((option, index) => {
269
+ // const { dataType } = option;
270
+ // return dataType || `${index}`;
271
+ // });
272
+ // });
273
+ // 第一份数据的数据类型
274
+ var firstDataType = resetProps.dataType || dataTypeSort[0];
275
+ // 记录下需要处理的所有数据
276
+ // TODO: 定义allData 类型
277
+ var _0 = useState({}), allData = _0[0], setAllData = _0[1];
278
+ // 收集修改数据
279
+ var onTrackChange = useMemoizedFn(function (dataType, data) {
280
+ setAllData(function (preAllData) {
281
+ var _a, _b;
282
+ if (preAllData[dataType]) {
283
+ var changeData = preAllData[dataType];
284
+ return __assign(__assign({}, preAllData), (_a = {}, _a[dataType] = __assign(__assign({}, changeData), data), _a));
285
+ }
286
+ return __assign(__assign({}, preAllData), (_b = {}, _b[dataType] = data, _b));
287
+ });
288
+ });
289
+ // 合并数据(数据最终还是要在一个表格中显示)
290
+ var _1 = useMergeRecords({
291
+ allData: allData,
292
+ dataTypeSort: dataTypeSort,
293
+ isDeleteAllFileWhenJustUseQj: isDeleteAllFileWhenJustUseQj,
294
+ isDeletePlaceholderFileData: isDeletePlaceholderFileData,
295
+ isSupportNoAttachQj: isSupportNoAttachQj,
296
+ }), mergeRecords = _1.mergeRecords, isHiddenColumns = _1.isHiddenColumns;
297
+ // 附件归属
298
+ var fileTypeColumns = useFileTypeColumns({
299
+ records: mergeRecords,
300
+ dataTypeSort: dataTypeSort,
301
+ allData: allData,
302
+ fileUploadProps: fileUploadProps,
303
+ isShowFileUpload: isShowFileUpload,
304
+ apiBaseUrl: apiBaseUrl,
305
+ }).fileTypeColumns;
306
+ // 是否需要显示达观配置
307
+ var isNeedDg = allOptions === null || allOptions === void 0 ? void 0 : allOptions.find(function (item) { return item.needDg + '' === '1'; });
308
+ // 附件相关
309
+ var fileColumns = useFileColumns({
310
+ records: mergeRecords,
311
+ dataTypeSort: dataTypeSort,
312
+ allData: allData,
313
+ fileUploadProps: fileUploadProps,
314
+ isShowFileUpload: isShowFileUpload,
315
+ apiBaseUrl: apiBaseUrl,
316
+ fileBaseUrl: fileBaseUrl,
317
+ firstDataType: firstDataType,
318
+ onValueChange: onValueChange,
319
+ onFileTypeChangeGetItem: onFileTypeChangeGetItem,
320
+ getCreateTimeHand: getCreateTimeHand,
321
+ isSingleQj: isSingleQj,
322
+ justNeedQj: justNeedQj,
323
+ setJustNeedQj: setJustNeedQj,
324
+ isShowFileType: isShowFileType,
325
+ currentIsEditMemo: currentIsEditMemo,
326
+ isDeleteAllFileWhenJustUseQj: isDeleteAllFileWhenJustUseQj,
327
+ isControlNeedQys: isControlNeedQys,
328
+ organizationId: organizationId,
329
+ onFileReplace: onFileReplace,
330
+ isToggleQys: isToggleQys,
331
+ previewUrl: previewUrl,
332
+ request: request,
333
+ isTranslation: isTranslation,
334
+ isNeedDg: !!isNeedDg,
335
+ }).fileColumns;
336
+ // 智能合同比对
337
+ var contractColumns = useContractColumns({
338
+ records: mergeRecords,
339
+ dataTypeSort: dataTypeSort,
340
+ allData: allData,
341
+ lookCompareHandle: lookCompareHandle,
342
+ dgInfoRef: dgInfoRef,
343
+ myCompareHandle: myCompareHandle,
344
+ onCheckedComparison: onCheckedComparison,
345
+ request: request,
346
+ previewUrl: previewUrl,
347
+ isTranslation: isTranslation,
348
+ }).contractColumns;
349
+ // 生成电子印章列数据
350
+ var electronColumns = useElectronColumns({
351
+ request: request,
352
+ records: mergeRecords,
353
+ dataTypeSort: dataTypeSort,
354
+ allData: allData,
355
+ setLoading: setLoading,
356
+ fmsIsElectronicSealLabel: fmsIsElectronicSealLabel,
357
+ fmsIsElectronicSealPushLabel: fmsIsElectronicSealPushLabel,
358
+ openingContractSealLabel: openingContractSealLabel,
359
+ isDeleteAllFileWhenJustUseQj: isDeleteAllFileWhenJustUseQj,
360
+ isShowOpeningContractSeal: isShowOpeningContractSeal,
361
+ isShowOpeningContractSealNotRelyQys: isShowOpeningContractSealNotRelyQys,
362
+ }).electronColumns;
363
+ // 生成群杰物理章列数据
364
+ var qunjColumns = useQunjColumns({
365
+ request: request,
366
+ records: mergeRecords,
367
+ dataTypeSort: dataTypeSort,
368
+ allData: allData,
369
+ setLoading: setLoading,
370
+ contractNumFlowIds: contractNumFlowIds,
371
+ refreshCode: refreshCode,
372
+ isSingleQj: isSingleQj,
373
+ isQjUseModal: isQjUseModal,
374
+ apiBaseUrl: apiBaseUrl,
375
+ caseId: caseId,
376
+ qjVerifyCodeData: qjVerifyCodeData,
377
+ getQjVerifyCodeHandle: getQjVerifyCodeHandle,
378
+ isShowSealApply: isShowSealApply,
379
+ goWorkflowSeal: goWorkflowSeal,
380
+ qunjListRenderFilter: qunjListRenderFilter,
381
+ }).qunjColumns;
382
+ // 翻译组件
383
+ var translateColumns = useTranslateCom({
384
+ request: request,
385
+ records: mergeRecords,
386
+ dataTypeSort: dataTypeSort,
387
+ allData: allData,
388
+ isTranslation: isTranslation,
389
+ previewUrl: previewUrl,
390
+ }).translateColumns;
391
+ // 组装columns
392
+ var columns = [
393
+ {
394
+ title: i18next.t('序号'),
395
+ dataIndex: 'index',
396
+ key: 'index',
397
+ width: 50,
398
+ align: 'center',
399
+ render: function (text, record, index) { return "" + (index + 1); },
400
+ },
401
+ ];
402
+ // 附件归属类型
403
+ if (isShowFileTypeMerge) {
404
+ columns.push.apply(columns, fileTypeColumns);
405
+ }
406
+ // 附件相关操作
407
+ columns.push.apply(columns, fileColumns);
408
+ // 其他配置
409
+ if (otherColumns) {
410
+ columns.push.apply(columns, otherColumns);
411
+ }
412
+ // 智能合同比对 如果不需要达观 那么肯定不显示
413
+ // 如果设置了 仅需要群杰印章 并且另外一个没有附件
414
+ if (isNeedDg && !isHiddenColumns) {
415
+ columns.push.apply(columns, contractColumns);
416
+ }
417
+ else if (isTranslation) {
418
+ columns.push.apply(columns, translateColumns);
419
+ }
420
+ // 是否需要电子印章配置
421
+ var isNeedQys = allOptions === null || allOptions === void 0 ? void 0 : allOptions.find(function (item) { return item.needQys + '' === '1'; });
422
+ // 是否有选盖章的附件
423
+ var isShowQys = allOptions === null || allOptions === void 0 ? void 0 : allOptions.find(function (item) { var _a, _b; return (_b = (_a = item.fileList) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, function (file) { return (file === null || file === void 0 ? void 0 : file.isElectronicSeal) + '' === '1'; }); });
424
+ // 电子印章
425
+ if ((isNeedQys && !isHiddenColumns) || isShowQysWhenNeedNotQys) {
426
+ // 非编辑状态 并且没有印章
427
+ if (allOptions[0].canEdit + '' === '1') {
428
+ columns.push.apply(columns, electronColumns);
429
+ }
430
+ else if (isShowQys) {
431
+ columns.push.apply(columns, electronColumns);
432
+ }
433
+ else if (isShowQysWhenNeedNotQys) {
434
+ columns.push.apply(columns, electronColumns);
435
+ }
436
+ }
437
+ // 是否需要群杰印章配置
438
+ var isNeedQj = allOptions === null || allOptions === void 0 ? void 0 : allOptions.find(function (item) { return item.needQj + '' === '1'; });
439
+ // 群杰印章
440
+ if (isNeedQj) {
441
+ columns.push.apply(columns, qunjColumns);
442
+ }
443
+ var getAllData = useMemoizedFn(function () {
444
+ var resultData = {};
445
+ Object.keys(allData).forEach(function (key) {
446
+ var _a, _b, _c, _d;
447
+ var data = allData[key];
448
+ var records = data.records || [];
449
+ // 是否 过滤掉无用的附件数据 20241014
450
+ var newRecords = isDeletePlaceholderFileData
451
+ ? records.filter(function (record) { return !currentRecordIsOnlyQunj(record); })
452
+ : records.slice();
453
+ resultData[key] = {
454
+ fileList: newRecords,
455
+ qunjSeal: data.currentQunjSeal,
456
+ electronicSealIdList: data.currentCheckedElectronicSealIdList,
457
+ /** 个人签署(手签章)已勾选用户 供业务系统保存并传给 final-seal */
458
+ personalSignUserIds: data.currentPersonalSignUserIds,
459
+ docAttachMap: data.currentDocAttachMap,
460
+ documentIdList: data.currentDocumentIdList,
461
+ contractId: data.currentContractId,
462
+ /** 用印次数是否合理 */
463
+ isTotalSealNumTooMore: countIsValidate(data.currentQunjSeal, false),
464
+ /** 群杰盖章地点 */
465
+ qunjAddress:
466
+ // 选了章子
467
+ ((_a = data.currentQunjSeal) === null || _a === void 0 ? void 0 : _a.details) &&
468
+ ((_c = (_b = data.currentQunjSeal) === null || _b === void 0 ? void 0 : _b.details) === null || _c === void 0 ? void 0 : _c.length) > 0 &&
469
+ // 并且是外部用印
470
+ ((_d = data.currentQunjSeal) === null || _d === void 0 ? void 0 : _d.isTakeOut) + '' === '1'
471
+ ? data.currentQunjAddress
472
+ : null,
473
+ needQys: data.needQys ? 1 : 0,
474
+ };
475
+ });
476
+ return resultData;
477
+ });
478
+ var modalHandleRef = useRef({});
479
+ // 当前未盖章的印章
480
+ var currentUnSealListRef = useRef({});
481
+ var isClickElectronSureRef = useRef(false);
482
+ useImperativeHandle(electronHandleRef, function () {
483
+ return {
484
+ /** 外部调用此方法时,需要传入合同模板ID */
485
+ compareHandle: myCompareHandle,
486
+ /** 获取所有数据 */
487
+ getAllData: function () {
488
+ return getAllData();
489
+ },
490
+ /** 验证组件是否通过校验 */
491
+ validateElectronTable: function (validateInfo) { return __awaiter(void 0, void 0, void 0, function () {
492
+ var validateAttachType, resultData, submitData, currentData, _a, _b, isQunjKey, _c, qunjSealKey, fileList, hasElectronicSeal, electronicSealFileList, hasQunj, electronicSealIdList, getTipSealName, docAttachMap, qunjSeal, contractId, isContranctNum, isEdit, needDg, needQys, needQj, preElectronicSealIdList, qunjChecked, isOnlyQj, isValidateAttachTypeIndex, msg, isValidateDgIndex, msg, isValidateAttachType, msg, msg, checkElectron, electronicSealedFileList_1, isMoreQunjCountIndex, msg, isMoreQunjCount, msg, isCheckTakeOutNoAddress, isCheckTakeOutNoAddressIndex, msg, msg, msg, hasNoWritContranctNum, msg, hasNoCheckedQjSeal, msg, noNumSealName_1, hasNoNumCheckedQjSeal, msg, msg, qjSealNos_1, isCoUsePass;
493
+ var _d, _e, _f, _g, _h, _j, _k;
494
+ return __generator(this, function (_l) {
495
+ switch (_l.label) {
496
+ case 0:
497
+ validateAttachType = (validateInfo || {}).validateAttachType;
498
+ resultData = getAllData();
499
+ submitData = resultData[firstDataType];
500
+ currentData = allData[firstDataType];
501
+ _a = ((_d = currentData.fileFieldsNameRef) === null || _d === void 0 ? void 0 : _d.current) || {}, _b = _a.isQunj, isQunjKey = _b === void 0 ? 'isQunj' : _b, _c = _a.qunjSeal, qunjSealKey = _c === void 0 ? 'qunjSeal' : _c;
502
+ fileList = submitData.fileList;
503
+ hasElectronicSeal = fileList === null || fileList === void 0 ? void 0 : fileList.some(function (item) { return !!item.isElectronicSeal; });
504
+ electronicSealFileList = (_g = (_f = (_e = fileList === null || fileList === void 0 ? void 0 : fileList.filter) === null || _e === void 0 ? void 0 : _e.call(fileList, function (item) { return !!item.isElectronicSeal; })) === null || _f === void 0 ? void 0 : _f.map) === null || _g === void 0 ? void 0 : _g.call(_f, function (item) { return item.attachId; });
505
+ hasQunj = fileList === null || fileList === void 0 ? void 0 : fileList.some(function (item) { return !!(item === null || item === void 0 ? void 0 : item[isQunjKey]); });
506
+ electronicSealIdList = submitData.electronicSealIdList || [];
507
+ getTipSealName = function (item) {
508
+ return isNewQunjSealStyle
509
+ ? (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName)
510
+ : item === null || item === void 0 ? void 0 : item.sealName;
511
+ };
512
+ docAttachMap = {};
513
+ try {
514
+ docAttachMap = submitData.docAttachMap
515
+ ? JSON.parse(submitData.docAttachMap)
516
+ : {};
517
+ }
518
+ catch (err) {
519
+ console.log(i18next.t('解析数据失败!!!!!'));
520
+ }
521
+ qunjSeal = submitData.qunjSeal;
522
+ contractId = submitData.contractId;
523
+ isContranctNum = currentData.isContranctNum;
524
+ isEdit = currentData.isEdit;
525
+ needDg = currentData.needDg;
526
+ needQys = currentData.needQys;
527
+ needQj = currentData.needQj;
528
+ preElectronicSealIdList = currentData === null || currentData === void 0 ? void 0 : currentData.clickElectronicSealIdList;
529
+ qunjChecked = currentData.qunjChecked;
530
+ isOnlyQj = fileList.length === 0;
531
+ // 0. 智能合同比对相关验证
532
+ if (isEdit && needDg) {
533
+ if (isChoiseChangeTemplateValid) {
534
+ isValidateAttachTypeIndex = fileList.findIndex(function (item) {
535
+ return (item.attachId &&
536
+ !item.templateAttachId &&
537
+ (validateAttachType
538
+ ? validateAttachType(item)
539
+ : item.attachType === '001'));
540
+ });
541
+ if (isValidateAttachTypeIndex !== -1) {
542
+ msg = i18next.t('第 {{slot0}} 行数据,附件类型为合同本身,需要挑选比对模板!', { slot0: isValidateAttachTypeIndex + 1 });
543
+ message.warning(msg);
544
+ return [2 /*return*/, Promise.reject(msg)];
545
+ }
546
+ }
547
+ isValidateDgIndex = fileList.findIndex(function (item) {
548
+ return (item.attachId &&
549
+ item.templateAttachId &&
550
+ !item.taskId &&
551
+ (validateAttachType
552
+ ? validateAttachType(item)
553
+ : item.attachType === '001'));
554
+ });
555
+ if (isValidateDgIndex !== -1) {
556
+ msg = i18next.t('第 {{slot0}} 行数据,没有生成任务id,请点击开始比对按钮!', { slot0: isValidateDgIndex + 1 });
557
+ message.warning(msg);
558
+ return [2 /*return*/, Promise.reject(msg)];
559
+ }
560
+ isValidateAttachType = fileList.findIndex(function (item) {
561
+ return !item.attachType;
562
+ });
563
+ if (resetProps.isAllowedPatchFileType &&
564
+ isValidateAttachType !== -1) {
565
+ msg = i18next.t('第 {{slot0}} 行数据,没有选择附件类型,请选择!', { slot0: isValidateAttachType + 1 });
566
+ message.warning(msg);
567
+ return [2 /*return*/, Promise.reject(msg)];
568
+ }
569
+ }
570
+ // 1. 指定盖章位置后,又修改了选中印章信息 并且本次一定手动指定了签署位置
571
+ if (isEdit &&
572
+ needQys &&
573
+ !isClickElectronSureRef.current &&
574
+ !isOnlyQj &&
575
+ preElectronicSealIdList &&
576
+ electronicSealIdList.length !== (preElectronicSealIdList === null || preElectronicSealIdList === void 0 ? void 0 : preElectronicSealIdList.length)) {
577
+ Modal.confirm({
578
+ title: i18next.t('当前所勾选的电子印章信息与上一次盖章时有差异,请确认是否继续?'),
579
+ okText: i18next.t('是'),
580
+ okType: 'danger',
581
+ cancelText: i18next.t('否'),
582
+ onOk: function () {
583
+ isClickElectronSureRef.current = true;
584
+ },
585
+ onCancel: function () {
586
+ isClickElectronSureRef.current = false;
587
+ },
588
+ });
589
+ return [2 /*return*/, Promise.reject(i18next.t('当前所勾选的电子印章信息与上一次盖章时有差异,请确认是否继续?'))];
590
+ }
591
+ // 2. 给附件勾选了加盖电子印章 但是未选择电子印章列表
592
+ if (isEdit &&
593
+ needQys &&
594
+ electronicSealIdList.length === 0 &&
595
+ hasElectronicSeal &&
596
+ !isOnlyQj) {
597
+ msg = i18next.t('请勾选加盖电子印章所需要的印章列表!');
598
+ message.warning(msg);
599
+ return [2 /*return*/, Promise.reject(msg)];
600
+ }
601
+ checkElectron = (_h = fileList === null || fileList === void 0 ? void 0 : fileList.find) === null || _h === void 0 ? void 0 : _h.call(fileList, function (item) { return !!(item === null || item === void 0 ? void 0 : item.isElectronicSeal); });
602
+ if (isEdit &&
603
+ needQys &&
604
+ contractId &&
605
+ docAttachMap &&
606
+ electronicSealFileList &&
607
+ checkElectron) {
608
+ electronicSealedFileList_1 = [];
609
+ Object.keys(docAttachMap).forEach(function (key) {
610
+ // const value = docAttachMap[key];
611
+ if (electronicSealFileList.find(function (attachId) { return attachId === key; }) ||
612
+ key !== 'needYjzrr') {
613
+ // 将当前合同下已经盖章的附件 添加到 已盖章附件列表中
614
+ electronicSealedFileList_1.push(key);
615
+ }
616
+ });
617
+ if (!isEqual(electronicSealFileList.sort(), electronicSealedFileList_1.sort())) {
618
+ message.warning(i18next.t('附件盖章信息有变动,请重新确认盖章信息'));
619
+ return [2 /*return*/, Promise.reject(i18next.t('附件盖章信息有变动,请重新确认盖章信息'))];
620
+ }
621
+ }
622
+ // 3. 群杰超过4倍 禁止提交审批
623
+ if (isEdit && needQj && isContranctNum) {
624
+ // 单附件都需要选群杰章 校验逻辑
625
+ if (isSingleQj && hasQunj) {
626
+ isMoreQunjCountIndex = fileList.findIndex(function (file) {
627
+ var isQunj = file === null || file === void 0 ? void 0 : file[isQunjKey];
628
+ // 如果没有勾选,不需要验证
629
+ if (!isQunj) {
630
+ return false;
631
+ }
632
+ var qunjSeal = file === null || file === void 0 ? void 0 : file[qunjSealKey];
633
+ var isMoreQunjCount = countIsValidate(qunjSeal, false);
634
+ if (!isMoreQunjCount) {
635
+ return true;
636
+ }
637
+ return false;
638
+ });
639
+ if (isMoreQunjCountIndex !== -1) {
640
+ msg = i18next.t('第{{slot0}}行数据,您的群杰章用印次数远远超过合理次数范围,请修改。', { slot0: isMoreQunjCountIndex + 1 });
641
+ message.warning(msg);
642
+ return [2 /*return*/, Promise.reject(msg)];
643
+ }
644
+ }
645
+ // 整体盖群杰章校验逻辑
646
+ if (!isSingleQj) {
647
+ isMoreQunjCount = countIsValidate(qunjSeal, false);
648
+ if (!isMoreQunjCount) {
649
+ msg = i18next.t('您的群杰章用印次数远远超过合理次数范围,请修改。');
650
+ message.warning(msg);
651
+ return [2 /*return*/, Promise.reject(msg)];
652
+ }
653
+ }
654
+ }
655
+ isCheckTakeOutNoAddress = function (data) {
656
+ if (data &&
657
+ data.qunjSeal &&
658
+ data.qunjSeal.isTakeOut + '' === '1' &&
659
+ (!data.qunjAddress || data.qunjAddress.length === 0)) {
660
+ return true;
661
+ }
662
+ return false;
663
+ };
664
+ if (isEdit && needQj) {
665
+ // 对于那种每个附件都需要选择群杰用印的逻辑
666
+ if (isSingleQj) {
667
+ isCheckTakeOutNoAddressIndex = fileList.findIndex(function (file) {
668
+ var isQunj = file === null || file === void 0 ? void 0 : file[isQunjKey];
669
+ // 如果没有勾选,不需要验证
670
+ if (!isQunj) {
671
+ return false;
672
+ }
673
+ var isCheckTakeOutNoAddressResult = isCheckTakeOutNoAddress(file);
674
+ if (isCheckTakeOutNoAddressResult) {
675
+ return true;
676
+ }
677
+ return false;
678
+ });
679
+ if (isCheckTakeOutNoAddressIndex !== -1) {
680
+ msg = i18next.t('第{{slot0}}行数据,您的群杰章用选了外部用印,但是没有选择外部用印的地址!', { slot0: isCheckTakeOutNoAddressIndex + 1 });
681
+ message.warning(msg);
682
+ return [2 /*return*/, Promise.reject(msg)];
683
+ }
684
+ }
685
+ else if (isCheckTakeOutNoAddress(submitData)) {
686
+ msg = i18next.t('您的群杰印章选了外部用印,但是没有选择外部用印的地址!');
687
+ message.warning(msg);
688
+ return [2 /*return*/, Promise.reject(msg)];
689
+ }
690
+ }
691
+ // 4. 没有确认盖章
692
+ if (isEdit &&
693
+ needQys &&
694
+ hasElectronicSeal &&
695
+ !contractId &&
696
+ !isOnlyQj) {
697
+ msg = i18next.t('请点击指定签署位置按钮,指定签署位置后方可提交!');
698
+ message.warning(msg);
699
+ return [2 /*return*/, Promise.reject(msg)];
700
+ }
701
+ // 5. 合同份数验证
702
+ if (isEdit && needQj) {
703
+ // 单附件都需要选群杰章 校验逻辑
704
+ if (isSingleQj && hasQunj) {
705
+ // 合同份数校验
706
+ if (isContranctNum) {
707
+ hasNoWritContranctNum = fileList.findIndex(function (file) {
708
+ var isQunj = file === null || file === void 0 ? void 0 : file[isQunjKey];
709
+ // 如果没有勾选,不需要验证
710
+ if (!isQunj) {
711
+ return false;
712
+ }
713
+ var qunjSeal = file === null || file === void 0 ? void 0 : file[qunjSealKey];
714
+ if (!qunjSeal.contranctNum) {
715
+ return true;
716
+ }
717
+ return false;
718
+ });
719
+ if (hasNoWritContranctNum !== -1) {
720
+ msg = i18next.t('第{{slot0}}行数据,没有填写群杰章合同份数。', { slot0: hasNoWritContranctNum + 1 });
721
+ message.warning(msg);
722
+ return [2 /*return*/, Promise.reject(msg)];
723
+ }
724
+ }
725
+ hasNoCheckedQjSeal = fileList.findIndex(function (file) {
726
+ var _a, _b;
727
+ var isQunj = file === null || file === void 0 ? void 0 : file[isQunjKey];
728
+ // 如果没有勾选,不需要验证
729
+ if (!isQunj) {
730
+ return false;
731
+ }
732
+ var qunjSeal = file === null || file === void 0 ? void 0 : file[qunjSealKey];
733
+ if (!((_a = qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) ||
734
+ ((_b = qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) === null || _b === void 0 ? void 0 : _b.length) === 0) {
735
+ return true;
736
+ }
737
+ return false;
738
+ });
739
+ if (hasNoCheckedQjSeal !== -1) {
740
+ msg = i18next.t('第{{slot0}}行数据,勾选了盖群杰章,但是没有选择群杰印章', { slot0: hasNoCheckedQjSeal + 1 });
741
+ message.warning(msg);
742
+ return [2 /*return*/, Promise.reject(msg)];
743
+ }
744
+ noNumSealName_1 = '';
745
+ hasNoNumCheckedQjSeal = fileList.findIndex(function (file) {
746
+ var _a;
747
+ var isQunj = file === null || file === void 0 ? void 0 : file[isQunjKey];
748
+ // 如果没有勾选,不需要验证
749
+ if (!isQunj) {
750
+ return false;
751
+ }
752
+ var qunjSeal = file === null || file === void 0 ? void 0 : file[qunjSealKey];
753
+ if (Array.isArray(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) &&
754
+ ((_a = qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) > 0) {
755
+ var noNumItem = qunjSeal.details.find(function (item) { return !item.sealCount; });
756
+ if (noNumItem) {
757
+ noNumSealName_1 = getTipSealName(noNumItem);
758
+ return true;
759
+ }
760
+ }
761
+ return false;
762
+ });
763
+ if (hasNoNumCheckedQjSeal !== -1) {
764
+ msg = i18next.t('第{{slot0}}行数据,请检查是否选了印章,但是没填用印次数的印章。如:{{noNumSealName}}', {
765
+ slot0: hasNoNumCheckedQjSeal + 1,
766
+ noNumSealName: noNumSealName_1,
767
+ });
768
+ message.warning(msg);
769
+ return [2 /*return*/, Promise.reject(msg)];
770
+ }
771
+ }
772
+ // 整体盖群杰章校验逻辑
773
+ // 20250424 验证逻辑增加必须选择了群杰印章
774
+ if (!isSingleQj &&
775
+ qunjChecked &&
776
+ (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) &&
777
+ ((_j = qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) === null || _j === void 0 ? void 0 : _j.length) > 0) {
778
+ // 合同份数为空
779
+ if (isContranctNum && !qunjSeal.contranctNum) {
780
+ message.warning(i18next.t('请填写合同份数!'));
781
+ return [2 /*return*/, Promise.reject(i18next.t('请填写合同份数!'))];
782
+ }
783
+ // 勾选了群杰印章 没有填用印次数
784
+ if (((_k = qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) === null || _k === void 0 ? void 0 : _k.length) > 0) {
785
+ qunjSeal.details.forEach(function (item) {
786
+ if (!item.sealCount) {
787
+ message.warning(i18next.t('请填写{{slot0}} 的用印次数!', {
788
+ slot0: getTipSealName(item),
789
+ }));
790
+ }
791
+ });
792
+ if (qunjSeal.details.filter(function (item) { return !item.sealCount; }).length > 0) {
793
+ return [2 /*return*/, Promise.reject(i18next.t('请填写用印次数!'))];
794
+ }
795
+ }
796
+ else {
797
+ msg = i18next.t('请选择群杰用印!');
798
+ message.warning(msg);
799
+ return [2 /*return*/, Promise.reject(msg)];
800
+ }
801
+ }
802
+ }
803
+ if (!isEdit) return [3 /*break*/, 2];
804
+ qjSealNos_1 = new Set();
805
+ ((qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) || []).forEach(function (item) {
806
+ if (item === null || item === void 0 ? void 0 : item.sealNo) {
807
+ qjSealNos_1.add(item.sealNo + '');
808
+ }
809
+ });
810
+ (fileList || []).forEach(function (file) {
811
+ var _a;
812
+ var details = (_a = file === null || file === void 0 ? void 0 : file[qunjSealKey]) === null || _a === void 0 ? void 0 : _a.details;
813
+ (Array.isArray(details) ? details : []).forEach(function (item) {
814
+ if (item === null || item === void 0 ? void 0 : item.sealNo) {
815
+ qjSealNos_1.add(item.sealNo + '');
816
+ }
817
+ });
818
+ });
819
+ if (!(electronicSealIdList.length > 0 || qjSealNos_1.size > 0)) return [3 /*break*/, 2];
820
+ setLoading({
821
+ spinning: true,
822
+ tip: i18next.t('服务器验证中...'),
823
+ });
824
+ return [4 /*yield*/, checkSealCoUse({
825
+ request: request,
826
+ qysSealIds: electronicSealIdList,
827
+ qjSealNos: Array.from(qjSealNos_1),
828
+ })];
829
+ case 1:
830
+ isCoUsePass = _l.sent();
831
+ setLoading({
832
+ spinning: false,
833
+ });
834
+ if (!isCoUsePass) {
835
+ return [2 /*return*/, Promise.reject(false)];
836
+ }
837
+ _l.label = 2;
838
+ case 2:
839
+ // 6. 调接口检测 是否存在未确认盖章位置的印章
840
+ if (needQys &&
841
+ isEdit &&
842
+ hasElectronicSeal &&
843
+ electronicSealIdList.length > 0) {
844
+ setLoading({
845
+ spinning: true,
846
+ tip: i18next.t('服务器验证中...'),
847
+ });
848
+ // 调用接口
849
+ return [2 /*return*/, getNoSealInfoList({
850
+ contractId: contractId,
851
+ sealIdList: electronicSealIdList,
852
+ deptId: resetProps.deptId,
853
+ secondDepId: resetProps.secondDepId,
854
+ needYjzrr: docAttachMap.needYjzrr === 'true' ||
855
+ docAttachMap.needYjzrr === true
856
+ ? true
857
+ : false,
858
+ })
859
+ .then(function (res) {
860
+ setLoading({
861
+ spinning: false,
862
+ });
863
+ if (res.length > 0) {
864
+ currentUnSealListRef.current = res;
865
+ modalHandleRef.current.setInfo(true, {
866
+ unSealList: res,
867
+ });
868
+ return Promise.reject(i18next.t('还有印章未通过校验'));
869
+ }
870
+ else {
871
+ return Promise.resolve(true);
872
+ }
873
+ })
874
+ .catch(function (err) {
875
+ setLoading({
876
+ spinning: false,
877
+ });
878
+ return Promise.reject(err);
879
+ })];
880
+ }
881
+ return [2 /*return*/, Promise.resolve(true)];
882
+ }
883
+ });
884
+ }); },
885
+ /** 切换部门时,应该清空电子印章相关数据 */
886
+ changeDeptIdClearQysDataHandler: function (dataType) {
887
+ var clearAllElectronDataHandler = allData[firstDataType].clearAllElectronDataHandler;
888
+ clearAllElectronDataHandler && clearAllElectronDataHandler(dataType);
889
+ },
890
+ };
891
+ });
892
+ var myRowSelection = useMemo(function () { return ({
893
+ type: 'checkbox',
894
+ onChange: function (selectedRowKeys, selectedRows) {
895
+ selectRows.current = selectedRows.map(function (item) {
896
+ var newItem = __assign({}, item);
897
+ return newItem;
898
+ });
899
+ },
900
+ }); }, []);
901
+ var _2 = allData[firstDataType] || {}, sameTypeRecords = _2.records, setSameTypeRecords = _2.setRecords, parseCurrentUploadFile = _2.parseCurrentUploadFile;
902
+ function addFile(info, callback) {
903
+ var _a;
904
+ var file = info.file;
905
+ if (file.status === 'done') {
906
+ var currentData = allData[firstDataType];
907
+ // 附件类型字段对应表
908
+ var _b = ((_a = currentData.fileFieldsNameRef) === null || _a === void 0 ? void 0 : _a.current) || {}, _c = _b.isQunj, isQunjKey_1 = _c === void 0 ? 'isQunj' : _c, _d = _b.qunjSeal, qunjSealKey_1 = _d === void 0 ? 'qunjSeal' : _d;
909
+ setSameTypeRecords(function (preRecords) {
910
+ var copyRecords = (preRecords === null || preRecords === void 0 ? void 0 : preRecords.slice()) || [];
911
+ copyRecords = copyRecords.filter(function (record) { return !currentRecordIsOnlyQunj(record); });
912
+ // 插入一个给开发操作附件的机会
913
+ var newFile = callback(file);
914
+ newFile.createTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
915
+ // 每个附件都可以添加群杰时控制
916
+ if (isSingleQj) {
917
+ newFile[isQunjKey_1] = 1;
918
+ newFile[qunjSealKey_1] = { isTakeOut: 0 };
919
+ }
920
+ if (parseCurrentUploadFile) {
921
+ newFile = parseCurrentUploadFile(newFile);
922
+ }
923
+ copyRecords.push(newFile);
924
+ return copyRecords;
925
+ });
926
+ }
927
+ }
928
+ function onFileChange(info) {
929
+ addFile(info, function (file) {
930
+ var _a;
931
+ var _b, _c, _d, _e;
932
+ return _a = {
933
+ attachId: (_c = (_b = file === null || file === void 0 ? void 0 : file.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.attachId,
934
+ attachName: (_e = (_d = file === null || file === void 0 ? void 0 : file.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.originalName
935
+ },
936
+ _a[DATA_TYPE_KEY] = firstDataType,
937
+ _a;
938
+ });
939
+ }
940
+ function onFileReplace(info, oldVersionId) {
941
+ addFile(info, function (file) {
942
+ var _a;
943
+ var _b, _c, _d, _e;
944
+ return _a = {
945
+ attachId: (_c = (_b = file === null || file === void 0 ? void 0 : file.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.attachId,
946
+ attachName: (_e = (_d = file === null || file === void 0 ? void 0 : file.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.originalName,
947
+ oldVersionId: oldVersionId
948
+ },
949
+ _a[DATA_TYPE_KEY] = firstDataType,
950
+ _a;
951
+ });
952
+ }
953
+ function onBatchDeleteHandle() {
954
+ var _a;
955
+ if (!selectRows.current || selectRows.current.length === 0) {
956
+ message.warning(i18next.t('请选择要删除的附件!'));
957
+ return;
958
+ }
959
+ var deleteInfo = {};
960
+ for (var _i = 0, _b = selectRows.current; _i < _b.length; _i++) {
961
+ var item = _b[_i];
962
+ var currentDataType = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
963
+ var _c = allData[currentDataType] || {}, isEdit = _c.isEdit, records = _c.records, setRecords = _c.setRecords;
964
+ if (beforeBatchDelete) {
965
+ if (!beforeBatchDelete(item)) {
966
+ message.warning(i18next.t('{{slot0}}不能删除!', { slot0: item.attachName }));
967
+ return;
968
+ }
969
+ }
970
+ else if (!isEdit) {
971
+ message.warning(i18next.t('存在不能删除的附件!'));
972
+ return;
973
+ }
974
+ if (deleteInfo[currentDataType]) {
975
+ (_a = deleteInfo[currentDataType].deleteList) === null || _a === void 0 ? void 0 : _a.push(item);
976
+ }
977
+ else {
978
+ deleteInfo[currentDataType] = {
979
+ records: records,
980
+ setRecords: setRecords,
981
+ deleteList: [item],
982
+ };
983
+ }
984
+ }
985
+ // 使用 batch 模式,将删除附件、清理电子印章、清理群杰印章的多次 onValueChange 合并为一次
986
+ batchOnValueChange(function () {
987
+ Object.entries(deleteInfo).forEach(function (_a) {
988
+ var _b;
989
+ var _c;
990
+ var dataType = _a[0], _d = _a[1], records = _d.records, setRecords = _d.setRecords, deleteList = _d.deleteList;
991
+ var newRecords = records === null || records === void 0 ? void 0 : records.filter(function (record) {
992
+ return !(deleteList === null || deleteList === void 0 ? void 0 : deleteList.some(function (item) {
993
+ return item.id
994
+ ? item.id === record.id
995
+ : item.attachId === record.attachId;
996
+ }));
997
+ });
998
+ setRecords(function () { return newRecords; });
999
+ // 批量删除后,检查是否需要清理印章信息
1000
+ var dataTypeData = allData[dataType] || {};
1001
+ // 电子印章:同类型下不再有任何勾选电子印章的附件时,清空共享数据
1002
+ var deletedHasElectronicSeal = deleteList === null || deleteList === void 0 ? void 0 : deleteList.some(function (item) { return (item === null || item === void 0 ? void 0 : item.isElectronicSeal) + '' === '1'; });
1003
+ if (deletedHasElectronicSeal) {
1004
+ var hasElectronicSealFile = newRecords === null || newRecords === void 0 ? void 0 : newRecords.some(function (record) { return (record === null || record === void 0 ? void 0 : record.isElectronicSeal) + '' === '1'; });
1005
+ if (!hasElectronicSealFile) {
1006
+ var onClearElectronListData = dataTypeData.onClearElectronListData, onClearElectronSetting = dataTypeData.onClearElectronSetting;
1007
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
1008
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
1009
+ onValueChange((_b = {},
1010
+ _b[dataType] = __assign(__assign({}, clearElectronListData), clearElectronSetting),
1011
+ _b));
1012
+ }
1013
+ }
1014
+ // 群杰印章:整体模式下附件全部删完时才清空共享数据
1015
+ // 单附件模式(isSingleQj)群杰数据存在附件 record 上,删除附件即删除数据
1016
+ if (!isSingleQj && (!newRecords || newRecords.length === 0)) {
1017
+ (_c = dataTypeData.setQunjChecked) === null || _c === void 0 ? void 0 : _c.call(dataTypeData, false);
1018
+ }
1019
+ });
1020
+ });
1021
+ }
1022
+ function onBatchPreviewHandle() {
1023
+ if (!selectRows.current || selectRows.current.length === 0) {
1024
+ message.warning(i18next.t('请选择要预览的附件!'));
1025
+ return;
1026
+ }
1027
+ var parseFileList = selectRows.current.map(function (file) {
1028
+ var attachId = file.attachId;
1029
+ return {
1030
+ attachId: attachId,
1031
+ attachName: file.attachName,
1032
+ };
1033
+ });
1034
+ var fileObject = {
1035
+ title: i18next.t('批量预览-{{slot0}}...', {
1036
+ slot0: parseFileList
1037
+ .map(function (item) { return item.attachName; })
1038
+ .join(',')
1039
+ .slice(0, 10),
1040
+ }),
1041
+ fileList: parseFileList,
1042
+ };
1043
+ var previewId = Date.now() + '';
1044
+ window.sessionStorage.setItem(previewId, JSON.stringify(fileObject));
1045
+ window.open("/batchPreview/" + previewId + "?hideFrame=1");
1046
+ }
1047
+ var defaultContext = useMemo(function () {
1048
+ return { isNewQys: isNewQys, isQjVerifyCode: isQjVerifyCode };
1049
+ }, [isNewQys, isQjVerifyCode]);
1050
+ return (React.createElement(ElectronSignaturesContext.Provider, { value: defaultContext },
1051
+ allOptions.map(function (options, index) {
1052
+ var mergeOptions = index === 0
1053
+ ? __assign(__assign({}, options), { onValueChange: onValueChange }) : __assign(__assign({ deptId: resetProps.deptId, flowId: resetProps.flowId, secondDepId: resetProps.secondDepId }, options), { onValueChange: onValueChange });
1054
+ return (React.createElement(ElectronSignaturesFragment, __assign({ key: index, dataType: "" + index, onTrackChange: onTrackChange, request: request, isUnControlled: isUnControlled, setLoading: setLoading, apiBaseUrl: apiBaseUrl, fileBaseUrl: fileBaseUrl, isSingleQj: isSingleQj, isSupportNoAttachQj: isSupportNoAttachQj }, mergeOptions)));
1055
+ }),
1056
+ React.createElement(ElectronSealBatchDownload, { request: request, apiBaseUrl: apiBaseUrl, selectRows: selectRows, allData: allData, dataTypeSort: dataTypeSort, isShowElectronBatchBtn: isShowElectronBatchBtn, isShowDownloadBatchBtn: isShowDownloadBatchBtn, isShowDoubleSignedBatchBtn: isShowDoubleSignedBatchBtn, batchDownloadZipName: batchDownloadZipName, firstDataType: firstDataType, organizationId: organizationId, isEdit: currentIsEditMemo, isNeedQys: !!isNeedQys, records: sameTypeRecords, setRecords: setSameTypeRecords, mergeRecords: mergeRecords, onValueChange: onValueChange, isShowBatchUseElectronicSealBtn: isShowBatchUseElectronicSealBtn, isShowBatchUseOpeningContractSealBtn: isShowBatchUseOpeningContractSealBtn, isShowOpeningContractSealNotRelyQys: isShowOpeningContractSealNotRelyQys, sealDownloadFlowStatus: sealDownloadFlowStatus },
1057
+ isShowFileUploadIndependence ||
1058
+ (isShowFileUpload && currentIsEditMemo) ? (React.createElement(FileUpload, __assign({ fileList: sameTypeRecords, apiBaseUrl: apiBaseUrl, onFileChange: onFileChange, multiple: true }, fileUploadProps), i18next.t('添加附件'))) : null,
1059
+ customButtons,
1060
+ isShowFileComparisonBtn ? (React.createElement(FileComparisonBtn, { compareHandle: compareHandle, lookCompareHandle: lookCompareHandle, fileBaseUrl: fileBaseUrl, onCompareClick: function () {
1061
+ if (!selectRows.current) {
1062
+ message.warning(i18next.t('请选择数据进行比对!'));
1063
+ return Promise.reject(i18next.t('请选择数据进行比对!'));
1064
+ }
1065
+ // 如果只选择了一条数据,那么可以判断是否有双签件
1066
+ // if (selectRows.current.length === 1) {
1067
+ // const doubleSignedSealInfoDTOListKey =
1068
+ // 'doubleSignedSealInfoDTOList';
1069
+ // const record = selectRows.current[0];
1070
+ // if (
1071
+ // record.doubleSignedSealInfoDTOList &&
1072
+ // record.doubleSignedSealInfoDTOList?.length
1073
+ // ) {
1074
+ // const doubleSignedSealInfoDTOObj =
1075
+ // record[doubleSignedSealInfoDTOListKey]?.[0];
1076
+ // }
1077
+ // } else
1078
+ if (selectRows.current.length !== 2) {
1079
+ message.warning(i18next.t('请选择两条数据进行比对!'));
1080
+ return Promise.resolve(i18next.t('请选择两条数据进行比对!'));
1081
+ }
1082
+ // 如果选了两条数据 那么就可以比对
1083
+ var data = selectRows.current.map(function (file) {
1084
+ var attachId = file.attachId;
1085
+ return {
1086
+ attachId: attachId,
1087
+ attachName: file.attachName,
1088
+ };
1089
+ });
1090
+ return new Promise(function (resolve) {
1091
+ resolve(data);
1092
+ });
1093
+ } })) : null,
1094
+ isShowBatchDeleteBtnIndependence ||
1095
+ (isShowBatchDeleteBtn && currentIsEditMemo) ? (React.createElement(Button, { type: "default", onClick: onBatchDeleteHandle, style: { marginRight: '10px' } }, i18next.t('批量删除'))) : null,
1096
+ isShowBatchPreviewBtn ? (React.createElement(Button, { type: "default", onClick: onBatchPreviewHandle, style: { marginRight: '10px' } }, i18next.t('批量预览'))) : null),
1097
+ React.createElement(Table, { dataSource: mergeRecords, columns: columns, rowKey: function (record) { return record.id || record.attachId; }, className: "zt-table electron-table", bordered: true, pagination: false, loading: loading, rowSelection: myRowSelection, scroll: __assign({ x: 'max-content', y: 500 }, tableScroll) }),
1098
+ React.createElement(LastQysModal, { modalHandleRef: modalHandleRef, appointSignLocation: function (info) {
1099
+ // 未盖章的印章id列表
1100
+ var needReSealList = info.needReSealList;
1101
+ var currentData = allData[firstDataType];
1102
+ var currentCheckedElectronicSealIdList = currentData.currentCheckedElectronicSealIdList;
1103
+ /** 最开始的未盖章的印章列表 (不是id列表) */
1104
+ var currentUnSealListRefValue = currentUnSealListRef.current;
1105
+ var currentUnSealIdListValue = currentUnSealListRefValue.map(function (item) { return item.sealId; });
1106
+ var appointSignLocation = currentData.appointSignLocation;
1107
+ var onElectronicSealIdChange = currentData.onElectronicSealIdChange;
1108
+ if (!Array.isArray(needReSealList)) {
1109
+ modalHandleRef.current.clear();
1110
+ return;
1111
+ }
1112
+ if (needReSealList.length === 0) {
1113
+ var newSealIdList_1 = currentCheckedElectronicSealIdList.filter(function (item) { return !currentUnSealIdListValue.includes(item); });
1114
+ onElectronicSealIdChange(newSealIdList_1);
1115
+ // modalHandleRef.current.clear();
1116
+ // // 如果所有未盖章的都取消了 那么可以认为校验直接通过了
1117
+ // isValidateSuccess && isValidateSuccess();
1118
+ // 重新调用指定盖章位置
1119
+ appointSignLocation === null || appointSignLocation === void 0 ? void 0 : appointSignLocation({
1120
+ callback: function (info) {
1121
+ modalHandleRef.current.clear();
1122
+ // 如果所有未盖章的都取消了 那么可以认为校验直接通过了
1123
+ isValidateSuccess && isValidateSuccess();
1124
+ },
1125
+ isCheckUnStampedSeal: true,
1126
+ otherParams: {
1127
+ sealIdList: newSealIdList_1,
1128
+ },
1129
+ });
1130
+ return;
1131
+ }
1132
+ // 计算出最终选中了的印章
1133
+ var deleteSealItemList = currentUnSealListRefValue.filter(function (item) { return !needReSealList.includes(item.sealId); });
1134
+ var deleteSealIdList = deleteSealItemList.map(function (item) { return item.sealId; });
1135
+ var newSealIdList = currentCheckedElectronicSealIdList.filter(function (item) { return !deleteSealIdList.includes(item); });
1136
+ appointSignLocation === null || appointSignLocation === void 0 ? void 0 : appointSignLocation({
1137
+ callback: function (info) {
1138
+ modalHandleRef.current.clear();
1139
+ },
1140
+ otherParams: {
1141
+ sealIdList: newSealIdList,
1142
+ },
1143
+ });
1144
+ } })));
1145
+ };
1146
+ export default memo(ElectronSignatures);