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,509 @@
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
+ import i18next from 'ztxkutils/dist/i18next';
13
+ import React, { memo, useRef } from 'react';
14
+ import { QuestionCircleOutlined } from '@ant-design/icons';
15
+ import { Button, Dropdown, Menu, message, Tooltip } from '../../../index';
16
+ import { sealFileBatchDownload, preCanDownload, fileBatchDownload, nextDownload, } from '../../Upload/utils';
17
+ import { DATA_TYPE_KEY } from '../hooks/useParseRecords';
18
+ import { getToken } from 'ztxkutils/dist/authority';
19
+ import { isFlowCompleted } from '../utils';
20
+ /**
21
+ * 下载电子印章相关逻辑
22
+ */
23
+ var ElectronSealBatchDownload = function (props) {
24
+ var request = props.request, apiBaseUrl = props.apiBaseUrl, selectRows = props.selectRows, allData = props.allData, isShowDownloadBatchBtn = props.isShowDownloadBatchBtn, isShowElectronBatchBtn = props.isShowElectronBatchBtn, isShowDoubleSignedBatchBtn = props.isShowDoubleSignedBatchBtn, batchDownloadZipName = props.batchDownloadZipName, children = props.children, firstDataType = props.firstDataType, organizationId = props.organizationId, isEdit = props.isEdit, isNeedQys = props.isNeedQys, records = props.records, setRecords = props.setRecords, isShowBatchUseElectronicSealBtn = props.isShowBatchUseElectronicSealBtn, isShowBatchUseOpeningContractSealBtn = props.isShowBatchUseOpeningContractSealBtn, isShowOpeningContractSealNotRelyQys = props.isShowOpeningContractSealNotRelyQys, _a = props.sealDownloadFlowStatus, sealDownloadFlowStatus = _a === void 0 ? '50' : _a;
25
+ /**
26
+ * @author 陈亚雄
27
+ * @description 批量下载
28
+ */
29
+ var batchDownloadRef = useRef(null);
30
+ var noCompressBatchDownloadRef = useRef(null);
31
+ var onAllDownloadHandle = function (options) {
32
+ var _a = options.isCompress, isCompress = _a === void 0 ? true : _a, _b = options.isWater, isWater = _b === void 0 ? false : _b;
33
+ var selectFiles = selectRows.current;
34
+ var authToken = getToken() || '';
35
+ if (isCompress) {
36
+ if (!preCanDownload(batchDownloadRef.current, function () {
37
+ batchDownloadRef.current = null;
38
+ })) {
39
+ return;
40
+ }
41
+ }
42
+ else {
43
+ if (!preCanDownload(noCompressBatchDownloadRef.current, function () {
44
+ noCompressBatchDownloadRef.current = null;
45
+ })) {
46
+ return;
47
+ }
48
+ }
49
+ if (Array.isArray(selectFiles) && selectFiles.length > 0) {
50
+ var list_1 = [];
51
+ try {
52
+ var listResult_1 = {};
53
+ selectFiles.forEach(function (item) {
54
+ var key = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
55
+ if (!listResult_1[key]) {
56
+ listResult_1[key] = [item];
57
+ }
58
+ else {
59
+ listResult_1[key].push(item);
60
+ }
61
+ });
62
+ Object.keys(listResult_1).forEach(function (key) {
63
+ var checkedRecords = listResult_1[key];
64
+ var _a = allData[key], records = _a.records, fileFieldsNameRef = _a.fileFieldsNameRef;
65
+ var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, attachName = _b.attachName;
66
+ checkedRecords.forEach(function (checkedRecord) {
67
+ if (records.find(function (record) { return record[attachId] === checkedRecord[attachId]; })) {
68
+ list_1.push({
69
+ fileName: checkedRecord[attachName],
70
+ fileId: checkedRecord[attachId],
71
+ isWatermark: isWater,
72
+ });
73
+ }
74
+ });
75
+ });
76
+ }
77
+ catch (err) {
78
+ list_1 = selectFiles.map(function (item) { return ({
79
+ fileName: item.attachName,
80
+ fileId: item.attachId,
81
+ isWatermark: isWater,
82
+ }); });
83
+ }
84
+ if (isCompress) {
85
+ // 根据相关信息生成下载的链接
86
+ if (!preCanDownload(batchDownloadRef.current, function () {
87
+ batchDownloadRef.current = null;
88
+ })) {
89
+ return;
90
+ }
91
+ batchDownloadRef.current = fileBatchDownload(list_1, {
92
+ authToken: authToken,
93
+ apiBaseUrl: apiBaseUrl || window.location.origin,
94
+ isCompress: isCompress,
95
+ zipName: batchDownloadZipName,
96
+ });
97
+ nextDownload(batchDownloadRef.current, function () {
98
+ batchDownloadRef.current = null;
99
+ });
100
+ }
101
+ else {
102
+ // 根据相关信息生成下载的链接
103
+ if (!preCanDownload(noCompressBatchDownloadRef.current, function () {
104
+ noCompressBatchDownloadRef.current = null;
105
+ })) {
106
+ return;
107
+ }
108
+ noCompressBatchDownloadRef.current = fileBatchDownload(list_1, {
109
+ authToken: authToken,
110
+ apiBaseUrl: apiBaseUrl || window.location.origin,
111
+ isCompress: isCompress,
112
+ zipName: batchDownloadZipName,
113
+ });
114
+ nextDownload(noCompressBatchDownloadRef.current, function () {
115
+ noCompressBatchDownloadRef.current = null;
116
+ });
117
+ }
118
+ }
119
+ else {
120
+ message.info(i18next.t('请选择需要下载的附件!'));
121
+ }
122
+ };
123
+ /** 批量下载盖章件 */
124
+ var sealBatchDownloadRef = useRef(null);
125
+ var sealNoCompressBatchDownloadRef = useRef(null);
126
+ var batchDownload = function (options) {
127
+ var _a = options || {}, _b = _a.isCompress, isCompress = _b === void 0 ? true : _b, _c = _a.isWater, isWater = _c === void 0 ? false : _c;
128
+ var list = selectRows.current;
129
+ // 计算能下载盖章件的数据
130
+ if (Array.isArray(list) && list.length > 0) {
131
+ var listResult_2 = {};
132
+ list.forEach(function (item) {
133
+ var key = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
134
+ if (!listResult_2[key]) {
135
+ listResult_2[key] = [item];
136
+ }
137
+ else {
138
+ listResult_2[key].push(item);
139
+ }
140
+ });
141
+ var canDownloadFileList_1 = {};
142
+ Object.keys(listResult_2).forEach(function (key) {
143
+ var checkedRecords = listResult_2[key];
144
+ var _a = allData[key], records = _a.records, currentDocAttachMap = _a.currentDocAttachMap, fileFieldsNameRef = _a.fileFieldsNameRef, flowStatus = _a.flowStatus;
145
+ var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, attachName = _b.attachName, isElectronicSeal = _b.isElectronicSeal;
146
+ // 这里加上流程状态是50时,才能下载盖章件的逻辑
147
+ if (currentDocAttachMap &&
148
+ isFlowCompleted(flowStatus, sealDownloadFlowStatus)) {
149
+ var resultRecords = checkedRecords.map(function (record) {
150
+ var currentRecord = records.find(function (item) { return (item === null || item === void 0 ? void 0 : item[attachId]) === (record === null || record === void 0 ? void 0 : record[attachId]); });
151
+ if (currentRecord) {
152
+ return currentRecord;
153
+ }
154
+ return record;
155
+ });
156
+ var qysAttachVOList = resultRecords
157
+ .filter(function (record) {
158
+ return (record === null || record === void 0 ? void 0 : record[isElectronicSeal || 'isElectronicSeal']) + '' === '1';
159
+ })
160
+ .map(function (item) { return ({
161
+ fileName: item === null || item === void 0 ? void 0 : item[attachName],
162
+ attachId: item === null || item === void 0 ? void 0 : item[attachId],
163
+ }); });
164
+ if (qysAttachVOList.length !== 0) {
165
+ var data = {
166
+ docAttachMap: currentDocAttachMap,
167
+ qysAttachVOList: qysAttachVOList,
168
+ };
169
+ if (isWater) {
170
+ data['watermarkOrganizationType'] = '12';
171
+ data['watermarkOrganizationId'] = organizationId;
172
+ }
173
+ canDownloadFileList_1[key] = {
174
+ params: data,
175
+ };
176
+ }
177
+ }
178
+ });
179
+ var keys = Object.keys(canDownloadFileList_1);
180
+ if (keys.length === 0) {
181
+ message.info(i18next.t('请选择可以下载的盖章件的数据!'));
182
+ return;
183
+ }
184
+ keys.forEach(function (key) {
185
+ var _a, _b;
186
+ var params = canDownloadFileList_1[key].params;
187
+ if (isCompress) {
188
+ // 根据相关信息生成下载的链接
189
+ if (!sealBatchDownloadRef.current) {
190
+ sealBatchDownloadRef.current = (_a = {},
191
+ _a[key] = null,
192
+ _a);
193
+ }
194
+ if (!preCanDownload(sealBatchDownloadRef.current[key], function () {
195
+ if (sealBatchDownloadRef.current) {
196
+ sealBatchDownloadRef.current[key] = null;
197
+ }
198
+ })) {
199
+ return;
200
+ }
201
+ sealBatchDownloadRef.current[key] = sealFileBatchDownload(request, params, {
202
+ isCompress: isCompress,
203
+ isWater: isWater,
204
+ });
205
+ }
206
+ else {
207
+ // 根据相关信息生成下载的链接
208
+ if (!sealNoCompressBatchDownloadRef.current) {
209
+ sealNoCompressBatchDownloadRef.current = (_b = {},
210
+ _b[key] = null,
211
+ _b);
212
+ }
213
+ if (!preCanDownload(sealNoCompressBatchDownloadRef.current[key], function () {
214
+ if (sealNoCompressBatchDownloadRef.current) {
215
+ sealNoCompressBatchDownloadRef.current[key] = null;
216
+ }
217
+ })) {
218
+ return;
219
+ }
220
+ sealNoCompressBatchDownloadRef.current[key] = sealFileBatchDownload(request, params, {
221
+ isCompress: isCompress,
222
+ isWater: isWater,
223
+ });
224
+ }
225
+ });
226
+ }
227
+ else {
228
+ message.info(i18next.t('请选择需要下载的盖章件!'));
229
+ }
230
+ };
231
+ /** 批量下载双签件 */
232
+ var sealDoubleBatchDownloadRef = useRef(null);
233
+ var sealDoubleNoCompressBatchDownloadRef = useRef(null);
234
+ var batchDoubleDownload = function (options) {
235
+ var _a = options.isCompress, isCompress = _a === void 0 ? true : _a, _b = options.isWater, isWater = _b === void 0 ? false : _b;
236
+ var list = selectRows.current;
237
+ // 计算能下载盖章件的数据
238
+ if (Array.isArray(list) && list.length > 0) {
239
+ var listResult_3 = {};
240
+ list.forEach(function (item) {
241
+ var key = item === null || item === void 0 ? void 0 : item[DATA_TYPE_KEY];
242
+ if (!listResult_3[key]) {
243
+ listResult_3[key] = [item];
244
+ }
245
+ else {
246
+ listResult_3[key].push(item);
247
+ }
248
+ });
249
+ var canDownloadFileList_2 = {};
250
+ Object.keys(listResult_3).forEach(function (key) {
251
+ var checkedRecords = listResult_3[key];
252
+ var _a = allData[key], records = _a.records, fileFieldsNameRef = _a.fileFieldsNameRef, flowStatus = _a.flowStatus;
253
+ var _b = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, attachId = _b.attachId, _doubleSignedSealInfoDTOList = _b.doubleSignedSealInfoDTOList;
254
+ var doubleSignedSealInfoDTOListKey = _doubleSignedSealInfoDTOList || 'doubleSignedSealInfoDTOList';
255
+ // 这里加上流程状态是50时,才能下载双签件的逻辑
256
+ if (isFlowCompleted(flowStatus, sealDownloadFlowStatus)) {
257
+ var resultRecords = checkedRecords.map(function (record) {
258
+ var currentRecord = records.find(function (item) { return (item === null || item === void 0 ? void 0 : item[attachId]) === (record === null || record === void 0 ? void 0 : record[attachId]); });
259
+ if (currentRecord) {
260
+ return currentRecord;
261
+ }
262
+ return record;
263
+ });
264
+ var qysAttachVOList = resultRecords.filter(function (record) {
265
+ return (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
266
+ Array.isArray(record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey]) &&
267
+ (record === null || record === void 0 ? void 0 : record[doubleSignedSealInfoDTOListKey].length) > 0;
268
+ });
269
+ if (qysAttachVOList.length !== 0) {
270
+ // 这里每个附件的双签件 都有一个合同模板信息
271
+ qysAttachVOList.forEach(function (record) {
272
+ var _a, _b, _c;
273
+ var key = record[attachId];
274
+ var doubleSignedSealInfoDTOObj = (_a = record[doubleSignedSealInfoDTOListKey]) === null || _a === void 0 ? void 0 : _a[0];
275
+ canDownloadFileList_2[key] = {
276
+ params: {
277
+ docAttachMap: doubleSignedSealInfoDTOObj === null || doubleSignedSealInfoDTOObj === void 0 ? void 0 : doubleSignedSealInfoDTOObj.docAttachMap,
278
+ qysAttachVOList: (_c = (_b = doubleSignedSealInfoDTOObj === null || doubleSignedSealInfoDTOObj === void 0 ? void 0 : doubleSignedSealInfoDTOObj.qysAttachVOList) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, function (item) { return (__assign(__assign({}, item), { fileName: item.fileName || item.attachName })); }),
279
+ },
280
+ };
281
+ });
282
+ }
283
+ }
284
+ });
285
+ var keys = Object.keys(canDownloadFileList_2);
286
+ if (keys.length === 0) {
287
+ message.info(i18next.t('请选择可以下载的双签件的数据!'));
288
+ return;
289
+ }
290
+ keys.forEach(function (key) {
291
+ var _a, _b;
292
+ var params = canDownloadFileList_2[key].params;
293
+ if (isCompress) {
294
+ // 根据相关信息生成下载的链接
295
+ if (!sealDoubleBatchDownloadRef.current) {
296
+ sealDoubleBatchDownloadRef.current = (_a = {},
297
+ _a[key] = null,
298
+ _a);
299
+ }
300
+ if (!preCanDownload(sealDoubleBatchDownloadRef.current[key], function () {
301
+ if (sealDoubleBatchDownloadRef.current) {
302
+ sealDoubleBatchDownloadRef.current[key] = null;
303
+ }
304
+ })) {
305
+ return;
306
+ }
307
+ sealDoubleBatchDownloadRef.current[key] = sealFileBatchDownload(request, params, {
308
+ isCompress: isCompress,
309
+ isWater: isWater,
310
+ });
311
+ }
312
+ else {
313
+ // 根据相关信息生成下载的链接
314
+ if (!sealDoubleNoCompressBatchDownloadRef.current) {
315
+ sealDoubleNoCompressBatchDownloadRef.current = (_b = {},
316
+ _b[key] = null,
317
+ _b);
318
+ }
319
+ if (!preCanDownload(sealDoubleNoCompressBatchDownloadRef.current[key], function () {
320
+ if (sealDoubleNoCompressBatchDownloadRef.current) {
321
+ sealDoubleNoCompressBatchDownloadRef.current[key] = null;
322
+ }
323
+ })) {
324
+ return;
325
+ }
326
+ sealDoubleNoCompressBatchDownloadRef.current[key] =
327
+ sealFileBatchDownload(request, params, {
328
+ isCompress: isCompress,
329
+ isWater: isWater,
330
+ });
331
+ }
332
+ });
333
+ }
334
+ else {
335
+ message.info(i18next.t('请选择需要下载的盖章件!'));
336
+ }
337
+ };
338
+ // 流程完结才能显示批量导出按钮
339
+ var isShowDownloadBtn = function () {
340
+ var _a, _b;
341
+ if (((_a = Object.keys(allData)) === null || _a === void 0 ? void 0 : _a.length) > 1 ||
342
+ isFlowCompleted((_b = allData === null || allData === void 0 ? void 0 : allData[firstDataType]) === null || _b === void 0 ? void 0 : _b.flowStatus, sealDownloadFlowStatus)) {
343
+ return true;
344
+ }
345
+ return false;
346
+ };
347
+ // 批量盖电子印章
348
+ var onBatchUseQys = function () {
349
+ if (!selectRows.current || selectRows.current.length === 0) {
350
+ message.info(i18next.t('请选择需要盖电子印章的文件'));
351
+ return;
352
+ }
353
+ if (records) {
354
+ var newRecords_1 = [];
355
+ records.forEach(function (record, index) {
356
+ // 当前record 是否存在选中项中
357
+ var isCheck = selectRows.current.some(function (item) { return item.attachId === record.attachId; });
358
+ if (!isCheck) {
359
+ newRecords_1.push(record);
360
+ return;
361
+ }
362
+ var currentData = allData[firstDataType];
363
+ var fileFieldsNameRef = currentData === null || currentData === void 0 ? void 0 : currentData.fileFieldsNameRef;
364
+ var _a = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, _b = _a.fmsIsElectronicSeal, fmsIsElectronicSealKey = _b === void 0 ? 'fmsIsElectronicSeal' : _b, _c = _a.openingContractSeal, openingContractSealKey = _c === void 0 ? 'openingContractSeal' : _c;
365
+ var newRecord = Object.assign({}, record);
366
+ // 如果当前选项勾中了盖户用电子章那也不处理
367
+ if ((newRecord === null || newRecord === void 0 ? void 0 : newRecord[openingContractSealKey]) + '' === '1') {
368
+ newRecords_1.push(newRecord);
369
+ return;
370
+ }
371
+ // 勾选盖电子印章逻辑
372
+ newRecord.isElectronicSeal = 1;
373
+ // 勾选加盖产融章逻辑
374
+ var isShowFms = (newRecord === null || newRecord === void 0 ? void 0 : newRecord.showFmsIsElectronicSeal) &&
375
+ (newRecord === null || newRecord === void 0 ? void 0 : newRecord[fmsIsElectronicSealKey]) != null &&
376
+ (newRecord === null || newRecord === void 0 ? void 0 : newRecord.attachType) === '001' &&
377
+ (newRecord === null || newRecord === void 0 ? void 0 : newRecord.isElectronicSeal);
378
+ if (isShowFms) {
379
+ // 这里的逻辑是 如果勾选了我们自己的电子印章 那么默认选中加盖产融章
380
+ var defaultValue = newRecord.defaultFmsIsElectronicSeal + '' === '1' ||
381
+ newRecord.defaultFmsIsElectronicSeal + '' === '0'
382
+ ? newRecord.defaultFmsIsElectronicSeal
383
+ : 1;
384
+ newRecord[fmsIsElectronicSealKey] = defaultValue;
385
+ }
386
+ // 勾选盖户用电子章逻辑
387
+ newRecord[openingContractSealKey] = 0;
388
+ newRecords_1.push(newRecord);
389
+ });
390
+ setRecords(newRecords_1);
391
+ }
392
+ };
393
+ // 是否显示户用合同章复选框
394
+ var isShowOpeningContractSeal = records === null || records === void 0 ? void 0 : records.find(function (record) { return (record === null || record === void 0 ? void 0 : record.showOpeningContractSeal) + '' === '1'; });
395
+ // 批量盖户用电子章
396
+ var onBatchUseContractSeal = function () {
397
+ if (!selectRows.current || selectRows.current.length === 0) {
398
+ message.info(i18next.t('请选择需要盖电子印章的文件'));
399
+ return;
400
+ }
401
+ if (records) {
402
+ var newRecords_2 = [];
403
+ records.forEach(function (record, index) {
404
+ // 当前record 是否存在选中项中
405
+ var isCheck = selectRows.current.some(function (item) { return item.attachId === record.attachId; });
406
+ if (!isCheck) {
407
+ newRecords_2.push(record);
408
+ return;
409
+ }
410
+ var newRecord = Object.assign({}, record);
411
+ // 如果当前选项勾中了盖电子印章那也不处理
412
+ if (newRecord.isElectronicSeal + '' === '1' &&
413
+ !isShowOpeningContractSealNotRelyQys) {
414
+ newRecords_2.push(newRecord);
415
+ return;
416
+ }
417
+ // 勾选加盖产融章逻辑
418
+ var currentData = allData[firstDataType];
419
+ var fileFieldsNameRef = currentData === null || currentData === void 0 ? void 0 : currentData.fileFieldsNameRef;
420
+ var _a = ((fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}).openingContractSeal, openingContractSealKey = _a === void 0 ? 'openingContractSeal' : _a;
421
+ // 勾选盖户用电子章逻辑
422
+ if (newRecord === null || newRecord === void 0 ? void 0 : newRecord.showOpeningContractSeal) {
423
+ newRecord[openingContractSealKey] = 1;
424
+ }
425
+ newRecords_2.push(newRecord);
426
+ });
427
+ setRecords(newRecords_2);
428
+ }
429
+ };
430
+ return (React.createElement("div", { className: "batch-download--container", style: { marginBottom: 10 } },
431
+ children,
432
+ isShowDownloadBatchBtn ? (React.createElement(Dropdown, { overlay: function () { return (React.createElement(Menu, { onClick: function (e) {
433
+ if (e.key === 'compress') {
434
+ onAllDownloadHandle({ isCompress: true, isWater: false });
435
+ return;
436
+ }
437
+ if (e.key === 'no-compress') {
438
+ onAllDownloadHandle({ isCompress: false, isWater: false });
439
+ return;
440
+ }
441
+ if (e.key === 'water--compress') {
442
+ onAllDownloadHandle({ isCompress: true, isWater: true });
443
+ return;
444
+ }
445
+ if (e.key === 'water--no-compress') {
446
+ onAllDownloadHandle({ isCompress: false, isWater: true });
447
+ return;
448
+ }
449
+ } },
450
+ React.createElement(Menu.Item, { key: "compress" }, i18next.t('打包下载')),
451
+ React.createElement(Menu.Item, { key: "no-compress" }, i18next.t('逐个下载')),
452
+ React.createElement(Menu.Item, { key: "water--compress" }, i18next.t('水印版-打包下载')),
453
+ React.createElement(Menu.Item, { key: "water--no-compress" }, i18next.t('水印版-逐个下载')))); }, placement: "bottomLeft" },
454
+ React.createElement(Button, { style: { marginRight: '10px' } }, i18next.t('批量下载原件')))) : null,
455
+ isShowElectronBatchBtn && isShowDownloadBtn() ? (React.createElement(Dropdown, { overlay: function () { return (React.createElement(Menu, { onClick: function (e) {
456
+ if (e.key === 'compress') {
457
+ batchDownload({ isCompress: true, isWater: false });
458
+ return;
459
+ }
460
+ if (e.key === 'no-compress') {
461
+ batchDownload({ isCompress: false, isWater: false });
462
+ return;
463
+ }
464
+ if (e.key === 'water--compress') {
465
+ batchDownload({ isCompress: true, isWater: true });
466
+ return;
467
+ }
468
+ if (e.key === 'water--no-compress') {
469
+ batchDownload({ isCompress: false, isWater: true });
470
+ return;
471
+ }
472
+ } },
473
+ React.createElement(Menu.Item, { key: "compress" }, i18next.t('打包下载')),
474
+ React.createElement(Menu.Item, { key: "no-compress" }, i18next.t('逐个下载')))); }, placement: "bottomLeft" },
475
+ React.createElement(Button, { style: { marginRight: '10px' } }, i18next.t('批量下载盖章件')))) : null,
476
+ isShowDoubleSignedBatchBtn && isShowDownloadBtn() ? (React.createElement(Dropdown, { overlay: function () { return (React.createElement(Menu, { onClick: function (e) {
477
+ if (e.key === 'compress') {
478
+ batchDoubleDownload({ isCompress: true, isWater: false });
479
+ return;
480
+ }
481
+ if (e.key === 'no-compress') {
482
+ batchDoubleDownload({ isCompress: false, isWater: false });
483
+ return;
484
+ }
485
+ if (e.key === 'water--compress') {
486
+ batchDoubleDownload({ isCompress: true, isWater: true });
487
+ return;
488
+ }
489
+ if (e.key === 'water--no-compress') {
490
+ batchDoubleDownload({ isCompress: false, isWater: true });
491
+ return;
492
+ }
493
+ } },
494
+ React.createElement(Menu.Item, { key: "compress" }, i18next.t('打包下载')),
495
+ React.createElement(Menu.Item, { key: "no-compress" }, i18next.t('逐个下载')))); }, placement: "bottomLeft" },
496
+ React.createElement(Button, { style: { marginRight: '10px' } }, i18next.t('批量下载双签件')))) : null,
497
+ isEdit && isNeedQys && isShowBatchUseElectronicSealBtn ? (React.createElement(Button, { type: "primary", onClick: onBatchUseQys },
498
+ i18next.t('批量使用电子印章'),
499
+ React.createElement(Tooltip, { placement: "bottomLeft", title: i18next.t('已经勾选了户用电子章的不会处理!') },
500
+ React.createElement(QuestionCircleOutlined, null)))) : null,
501
+ isEdit &&
502
+ isShowBatchUseOpeningContractSealBtn &&
503
+ (isShowOpeningContractSealNotRelyQys || isNeedQys) &&
504
+ !!isShowOpeningContractSeal ? (React.createElement(Button, { type: "primary", onClick: onBatchUseContractSeal },
505
+ i18next.t('批量盖光盈电子章'),
506
+ React.createElement(Tooltip, { placement: "bottomLeft", title: i18next.t('已经勾选了电子印章的不会处理!') },
507
+ React.createElement(QuestionCircleOutlined, null)))) : null));
508
+ };
509
+ export default memo(ElectronSealBatchDownload);
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ sealList?: any;
4
+ value?: any;
5
+ }
6
+ export declare const NoUseElectronSeal: React.FC;
7
+ declare const _default: React.NamedExoticComponent<IProps>;
8
+ export default _default;
@@ -0,0 +1,59 @@
1
+ import i18next from 'ztxkutils/dist/i18next';
2
+ import React, { memo, useContext } from 'react';
3
+ import { ElectronSignaturesContext } from '..';
4
+ /** 公司简称 fallback 到全称 */
5
+ function getOwnerShortName(item) {
6
+ return (item === null || item === void 0 ? void 0 : item.ownerShortName) || (item === null || item === void 0 ? void 0 : item.ownerName) || '';
7
+ }
8
+ /** 印章简称 fallback 到全称 */
9
+ function getSealShortName(item) {
10
+ return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
11
+ }
12
+ export var NoUseElectronSeal = function () {
13
+ return (React.createElement("div", { style: {
14
+ height: '100%',
15
+ display: 'flex',
16
+ alignItems: 'center',
17
+ justifyContent: 'center',
18
+ } }, i18next.t('本次流程未使用电子印章')));
19
+ };
20
+ /**
21
+ * 电子签章选择列表
22
+ */
23
+ var ElectronSealDetail = function (_a) {
24
+ var sealList = _a.sealList, value = _a.value;
25
+ var isNewElectronSealStyle = useContext(ElectronSignaturesContext).isNewElectronSealStyle;
26
+ // 电子印章数据没有加载完成或者加载出错
27
+ if (!Array.isArray(sealList)) {
28
+ return null;
29
+ }
30
+ // 本流程、部门下没有配置电子印章数据
31
+ if (sealList.length === 0) {
32
+ return React.createElement(NoUseElectronSeal, null);
33
+ }
34
+ // 非编辑模式下,没有选中任何印章
35
+ if (!Array.isArray(value) || value.length === 0) {
36
+ return React.createElement(NoUseElectronSeal, null);
37
+ }
38
+ // 新版展示样式:按照"公司简称 印章简称"模式展示,带"已选印章"标题
39
+ if (isNewElectronSealStyle) {
40
+ return (React.createElement("div", { className: "electron-seal-detail-new--wrap" },
41
+ React.createElement("div", { className: "seal-selected-title" }, "\u5DF2\u9009\u5370\u7AE0"),
42
+ value.map(function (id) {
43
+ var _a;
44
+ var completeItem = (_a = sealList === null || sealList === void 0 ? void 0 : sealList.find) === null || _a === void 0 ? void 0 : _a.call(sealList, function (sealItem) { return sealItem.sealId === id; });
45
+ return (React.createElement("div", { key: id, className: "seal-selected-item", title: (((completeItem === null || completeItem === void 0 ? void 0 : completeItem.ownerName) || '') + " " + ((completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName) || '')).trim() },
46
+ getOwnerShortName(completeItem),
47
+ " ",
48
+ getSealShortName(completeItem)));
49
+ })));
50
+ }
51
+ // 旧版展示样式:只显示印章简称
52
+ return (React.createElement("div", { className: "electron-seal-detail--wrap" }, value === null || value === void 0 ? void 0 : value.map(function (id) {
53
+ var _a;
54
+ var completeItem = (_a = sealList === null || sealList === void 0 ? void 0 : sealList.find) === null || _a === void 0 ? void 0 : _a.call(sealList, function (sealItem) { return sealItem.sealId === id; });
55
+ var displayName = (completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealShortName) || (completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName);
56
+ return (React.createElement("div", { key: id, className: "electron-seal-detail--wrap__item", title: completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName }, displayName));
57
+ })));
58
+ };
59
+ export default memo(ElectronSealDetail);
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { IElectronSignaturesItemPublic, IElectronSignaturesItem, IFileItem, ITrackItem } from '../interface';
3
+ interface IProps {
4
+ /** 请求 */
5
+ request: IElectronSignaturesItemPublic['request'];
6
+ /** 电子签章件相关信息 */
7
+ docAttachMap: IElectronSignaturesItem['docAttachMap'];
8
+ /** 当前行数据 */
9
+ record?: IFileItem;
10
+ /** 字段对应关系 */
11
+ fileFieldsNameRef: ITrackItem['fileFieldsNameRef'];
12
+ flowStatus: IElectronSignaturesItem['flowStatus'];
13
+ checked?: boolean;
14
+ }
15
+ declare const _default: React.NamedExoticComponent<IProps>;
16
+ export default _default;