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,436 @@
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
+ import i18next from 'ztxkutils/dist/i18next';
49
+ import { useEffect, useMemo, useState } from 'react';
50
+ import { unstable_batchedUpdates } from 'react-dom';
51
+ import { message } from '../../../index';
52
+ import useMemoizedFn from '../../utils/useMemoizedFn';
53
+ import checkSealCoUse from '../../utils/checkSealCoUse';
54
+ import { isFlowCompleted } from '../utils';
55
+ /**
56
+ * 电子印章设置相关操作
57
+ */
58
+ export default function useParseElectronSetting(options) {
59
+ var _this = this;
60
+ var isUnControlled = options.isUnControlled, onValueChange = options.onValueChange, dataType = options.dataType, request = options.request, setLoading = options.setLoading, records = options.records, deptId = options.deptId, secondDepId = options.secondDepId, contractId = options.contractId, docAttachMap = options.docAttachMap, documentIdList = options.documentIdList, electronicSealIdList = options.electronicSealIdList, isCheckedEconomic = options.isCheckedEconomic, setCurrentIsCheckedEconomic = options.setCurrentIsCheckedEconomic, personalSignUserIds = options.personalSignUserIds, setPersonalSignUserIds = options.setPersonalSignUserIds, canEdit = options.canEdit, flowStatus = options.flowStatus, onElectronicSealIdChange = options.onElectronicSealIdChange, qunjSeal = options.qunjSeal, fileFieldsNameRef = options.fileFieldsNameRef;
61
+ // 点击签署位置 实时记录点击时的印章列表
62
+ var _a = useState(), clickElectronicSealIdList = _a[0], setClickElectronicSealIdList = _a[1];
63
+ // 当前合同id数据
64
+ var _b = useState(function () {
65
+ return contractId;
66
+ }), currentContractId = _b[0], setCurrentContractId = _b[1];
67
+ // 当前合同id下 附件与文档的关联关系
68
+ var _c = useState(function () {
69
+ return docAttachMap;
70
+ }), currentDocAttachMap = _c[0], setCurrentDocAttachMap = _c[1];
71
+ // 当前文档列表数据
72
+ var _d = useState(function () {
73
+ return documentIdList;
74
+ }), currentDocumentIdList = _d[0], setCurrentDocumentIdList = _d[1];
75
+ // 未确认盖章位置的印章信息列表
76
+ var _e = useState([]), unElectronicSealList = _e[0], setUnElectronicSealList = _e[1];
77
+ var unElectronicSealIdList = useMemo(function () {
78
+ return unElectronicSealList.map(function (item) { return item.sealId; });
79
+ }, [unElectronicSealList]);
80
+ // 暴露一个清空内部数据的方法
81
+ var onClearElectronSetting = useMemoizedFn(function () {
82
+ // if (isUnControlled) {
83
+ setCurrentContractId(undefined);
84
+ setCurrentDocAttachMap(null);
85
+ setCurrentDocumentIdList([]);
86
+ // }
87
+ return {
88
+ contractId: undefined,
89
+ docAttachMap: null,
90
+ documentIdList: [],
91
+ };
92
+ });
93
+ // 指定签署位置
94
+ var appointSignLocation = useMemoizedFn(function (options) { return __awaiter(_this, void 0, void 0, function () {
95
+ var _a, callback, _b, otherParams, isCheckUnStampedSeal, _c, spinningTip, isCoUsePass, currentCheckedElectronAttachIds, isError, params, newSealIdList, stampedAttachIdList;
96
+ return __generator(this, function (_d) {
97
+ switch (_d.label) {
98
+ case 0:
99
+ _a = options || {}, callback = _a.callback, _b = _a.otherParams, otherParams = _b === void 0 ? {} : _b, isCheckUnStampedSeal = _a.isCheckUnStampedSeal, _c = _a.spinningTip, spinningTip = _c === void 0 ? i18next.t('指定签署位置中...') : _c;
100
+ // 选出选了盖电子印章的附件数据
101
+ if (!Array.isArray(records)) {
102
+ console.log(i18next.t('没有选中需要盖电子印章的数据!'));
103
+ return [2 /*return*/];
104
+ }
105
+ // 没有选择印章
106
+ if (!Array.isArray(electronicSealIdList) ||
107
+ (electronicSealIdList === null || electronicSealIdList === void 0 ? void 0 : electronicSealIdList.length) <= 0) {
108
+ console.log(i18next.t('没有选择电子印章!'));
109
+ message.error(i18next.t('没有选择需要盖章的电子印章!'));
110
+ return [2 /*return*/];
111
+ }
112
+ // 校验印章"必须共同使用"的约束(后端接口统一校验)
113
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading({
114
+ spinning: true,
115
+ tip: spinningTip,
116
+ });
117
+ return [4 /*yield*/, checkSealCoUse({
118
+ request: request,
119
+ qysSealIds: electronicSealIdList,
120
+ qjSealNos: collectQjSealNos(qunjSeal, records, fileFieldsNameRef),
121
+ })];
122
+ case 1:
123
+ isCoUsePass = _d.sent();
124
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading({
125
+ spinning: false,
126
+ });
127
+ if (!isCoUsePass) {
128
+ return [2 /*return*/];
129
+ }
130
+ currentCheckedElectronAttachIds = [];
131
+ isError = false;
132
+ records.forEach(function (record, index) {
133
+ if (!record.isElectronicSeal) {
134
+ return;
135
+ }
136
+ if (!record.attachId && !isError) {
137
+ message.error(i18next.t('第{{slot0}}行附件没有附件id,无法盖章!', {
138
+ slot0: index + 1,
139
+ }));
140
+ isError = true;
141
+ }
142
+ else {
143
+ currentCheckedElectronAttachIds.push(record.attachId);
144
+ }
145
+ });
146
+ if (isError) {
147
+ return [2 /*return*/];
148
+ }
149
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading({
150
+ spinning: true,
151
+ tip: spinningTip,
152
+ });
153
+ params = __assign({ attachIdList: [], sealIdList: electronicSealIdList, deleteAttachIdList: [], docAttachMap: currentDocAttachMap, deptId: deptId,
154
+ secondDepId: secondDepId, needYjzrr: isCheckedEconomic,
155
+ // 个人签署(手签章)用户 编辑合同全量更新 漏传会把已添加的手签用户从契约锁合同移除
156
+ personalSignUserIds: Array.isArray(personalSignUserIds)
157
+ ? personalSignUserIds
158
+ : [] }, otherParams);
159
+ newSealIdList = params.sealIdList;
160
+ setClickElectronicSealIdList(newSealIdList);
161
+ stampedAttachIdList = getStampedAttachIdListByMap(currentDocAttachMap);
162
+ // 这里参考之前的逻辑处理(不知道为什么这里没有处理印章逻辑 如果前后的印章不一致 应该也要重新勾选才是)
163
+ // (前后印章不同的逻辑 是在提交的时候处理的,会弹出一个模态框)
164
+ // 如果有合同id 传入合同id
165
+ // 有合同id 表明之前已经签署过位置了
166
+ // 需要处理下签署前后的附件数据
167
+ if (currentContractId) {
168
+ params.contractId = currentContractId;
169
+ // 找出此次新增加的附件
170
+ if (stampedAttachIdList.length === 0) {
171
+ params.attachIdList = currentCheckedElectronAttachIds;
172
+ }
173
+ else {
174
+ params.attachIdList = currentCheckedElectronAttachIds.filter(function (attachId) { return !stampedAttachIdList.includes(attachId); });
175
+ }
176
+ }
177
+ else {
178
+ params.attachIdList = currentCheckedElectronAttachIds;
179
+ }
180
+ // 找到需要删除的附件(之前已经盖了章的附件,但是本次没有选中盖电子印章的按钮)
181
+ // 已盖章的附件id列表中筛选出要删除的附件id列表
182
+ if (Array.isArray(stampedAttachIdList)) {
183
+ stampedAttachIdList.forEach(function (n) {
184
+ if (currentCheckedElectronAttachIds.length !== 0 &&
185
+ !currentCheckedElectronAttachIds.includes(n)) {
186
+ params.deleteAttachIdList.push(n);
187
+ }
188
+ });
189
+ }
190
+ request({
191
+ url: '/api/zmdms-resource/seal/confirm-seal-info',
192
+ method: 'POST',
193
+ timeout: 90000,
194
+ data: params,
195
+ })
196
+ .then(function (res) {
197
+ unstable_batchedUpdates(function () {
198
+ var _a;
199
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading({
200
+ spinning: false,
201
+ });
202
+ if (res.status === 200 &&
203
+ res.data.code === 200 &&
204
+ res.data.data.preSignUrl) {
205
+ // 更新一些数据
206
+ var newContractId = res.data.data.contractId; // 新合同id
207
+ var newDocAttachMap = res.data.data.docAttachMap; // 新文档对应关系(附件:合同id)
208
+ var newDocumentIdList = getDocumentIdListByMap(newDocAttachMap); // 新文档id列表
209
+ // 非受控模式 设置下内部数据
210
+ // 受控模式 会在effect中进行处理
211
+ // if (isUnControlled) {
212
+ setCurrentContractId(newContractId);
213
+ setCurrentDocAttachMap(newDocAttachMap);
214
+ setCurrentDocumentIdList(newDocumentIdList);
215
+ onElectronicSealIdChange(newSealIdList, false);
216
+ // }
217
+ if (otherParams.needYjzrr !== undefined) {
218
+ setCurrentIsCheckedEconomic(otherParams.needYjzrr);
219
+ }
220
+ // 回写接口返回的最新手签用户列表(编辑全量更新语义下的服务端数据为准)
221
+ if (setPersonalSignUserIds &&
222
+ Array.isArray(res.data.data.personalSignUserIds)) {
223
+ setPersonalSignUserIds(res.data.data.personalSignUserIds);
224
+ }
225
+ callback === null || callback === void 0 ? void 0 : callback({
226
+ checkAttachIdList: currentCheckedElectronAttachIds,
227
+ contractId: newContractId,
228
+ docAttachMap: newDocAttachMap,
229
+ documentIdList: newDocumentIdList,
230
+ });
231
+ // 更改当前数据
232
+ if (dataType) {
233
+ onValueChange &&
234
+ onValueChange((_a = {},
235
+ _a[dataType] = {
236
+ checkAttachIdList: currentCheckedElectronAttachIds,
237
+ contractId: newContractId,
238
+ docAttachMap: newDocAttachMap,
239
+ documentIdList: newDocumentIdList,
240
+ // 在这里更改下是否加盖一级责任人数据
241
+ isCheckedEconomic: params.needYjzrr,
242
+ // 手签用户列表 供业务系统保存 供 final-seal 使用
243
+ personalSignUserIds: params.personalSignUserIds,
244
+ electronicSealIdList: newSealIdList,
245
+ },
246
+ _a));
247
+ }
248
+ // 需要跳转到契约锁重新指定签署位置
249
+ // 如果需要检测是否还有 未确认盖章位置的印章信息列表
250
+ if (isCheckUnStampedSeal) {
251
+ if (unElectronicSealList.length > 0) {
252
+ window.open(res.data.data.preSignUrl);
253
+ }
254
+ }
255
+ else {
256
+ window.open(res.data.data.preSignUrl);
257
+ }
258
+ }
259
+ else {
260
+ message.error(res.data.msg || i18next.t('出错了'));
261
+ }
262
+ });
263
+ })
264
+ .catch(function (error) {
265
+ var _a, _b;
266
+ setLoading === null || setLoading === void 0 ? void 0 : setLoading({
267
+ spinning: false,
268
+ });
269
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('请求失败!'));
270
+ });
271
+ return [2 /*return*/];
272
+ }
273
+ });
274
+ }); });
275
+ // 预览盖章签署效果
276
+ var viewSignPage = useMemoizedFn(function () {
277
+ if (!currentContractId) {
278
+ message.error(i18next.t('缺少合同id,可能的原因:暂未指定签署位置,请重新指定!'));
279
+ return;
280
+ }
281
+ request({
282
+ url: '/api/zmdms-resource/seal/view-seal-state',
283
+ // 这里有一个逻辑,后端判断流程是否完结。是flowStatus === '15' 或者 canEdit === '0'
284
+ data: {
285
+ contractId: currentContractId,
286
+ canEdit: canEdit,
287
+ flowStatus: isFlowCompleted(flowStatus) ? flowStatus : '15',
288
+ },
289
+ method: 'POST',
290
+ })
291
+ .then(function (res) {
292
+ if (res.status === 200 &&
293
+ res.data.code === 200 &&
294
+ res.data.data.viewUrl) {
295
+ window.open(res.data.data.viewUrl);
296
+ }
297
+ else {
298
+ message.error(res.data.msg || i18next.t('出错了'));
299
+ }
300
+ })
301
+ .catch(function (error) {
302
+ var _a, _b;
303
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('请求失败!'));
304
+ });
305
+ });
306
+ // 查询未确认盖章位置的印章信息列表
307
+ var checkUnStampedSealList = useMemoizedFn(function () {
308
+ return request({
309
+ url: '/api/zmdms-resource/seal/query-unconfirmed-position-seal-list',
310
+ data: {
311
+ contractId: currentContractId,
312
+ sealIdList: electronicSealIdList,
313
+ deptId: deptId,
314
+ secondDepId: secondDepId,
315
+ needYjzrr: isCheckedEconomic,
316
+ },
317
+ method: 'POST',
318
+ })
319
+ .then(function (res) {
320
+ var _a;
321
+ if ((res === null || res === void 0 ? void 0 : res.status) === 200 && ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.code) === 200) {
322
+ var noSealList = res.data.data;
323
+ if (Array.isArray(noSealList) && noSealList.length > 0) {
324
+ setUnElectronicSealList(noSealList);
325
+ return Promise.resolve(false);
326
+ }
327
+ else {
328
+ return Promise.resolve(true);
329
+ }
330
+ }
331
+ })
332
+ .catch(function (error) {
333
+ var _a, _b;
334
+ message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('请求失败!'));
335
+ return Promise.resolve(false);
336
+ });
337
+ });
338
+ /**
339
+ * 如果是受控模式的话,直接将props的值 赋值给 内部变量
340
+ */
341
+ useEffect(function () {
342
+ // if (!isUnControlled) {
343
+ setCurrentContractId(contractId);
344
+ // }
345
+ }, [isUnControlled, contractId]);
346
+ useEffect(function () {
347
+ // if (!isUnControlled) {
348
+ setCurrentDocAttachMap(docAttachMap);
349
+ // }
350
+ }, [isUnControlled, docAttachMap]);
351
+ useEffect(function () {
352
+ // if (!isUnControlled) {
353
+ setCurrentDocumentIdList(documentIdList);
354
+ // }
355
+ }, [isUnControlled, documentIdList]);
356
+ return {
357
+ /** 点击签署位置 实时记录点击时的印章列表 */
358
+ clickElectronicSealIdList: clickElectronicSealIdList,
359
+ /** 当前合同id数据 */
360
+ currentContractId: currentContractId,
361
+ setCurrentContractId: setCurrentContractId,
362
+ /** 当前合同id下 附件与文档的关联关系 */
363
+ currentDocAttachMap: currentDocAttachMap,
364
+ setCurrentDocAttachMap: setCurrentDocAttachMap,
365
+ /** 当前文档列表数据 */
366
+ currentDocumentIdList: currentDocumentIdList,
367
+ setCurrentDocumentIdList: setCurrentDocumentIdList,
368
+ /** 指定签署位置 */
369
+ appointSignLocation: appointSignLocation,
370
+ /** 预览盖章效果 */
371
+ viewSignPage: viewSignPage,
372
+ /** 暴露一个清空数据的方法 */
373
+ onClearElectronSetting: onClearElectronSetting,
374
+ /** 查询未确认盖章位置的印章信息列表 */
375
+ checkUnStampedSealList: checkUnStampedSealList,
376
+ /** 未确认盖章信息的电子印章列表 */
377
+ unElectronicSealList: unElectronicSealList,
378
+ /** 未确认盖章信息的电子印章id列表 */
379
+ unElectronicSealIdList: unElectronicSealIdList,
380
+ };
381
+ }
382
+ /**
383
+ * 收集当前已选的群杰印章编号
384
+ * 包含整体选择的群杰印章 和 单附件模式下各附件选择的群杰印章
385
+ */
386
+ function collectQjSealNos(qunjSeal, records, fileFieldsNameRef) {
387
+ var _a;
388
+ var sealNos = new Set();
389
+ // 整体选择的群杰印章
390
+ ((qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) || []).forEach(function (item) {
391
+ if (item === null || item === void 0 ? void 0 : item.sealNo) {
392
+ sealNos.add(item.sealNo + '');
393
+ }
394
+ });
395
+ // 单附件模式下 各附件选择的群杰印章
396
+ var qunjSealKey = ((_a = fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) === null || _a === void 0 ? void 0 : _a.qunjSeal) || 'qunjSeal';
397
+ (records || []).forEach(function (record) {
398
+ var _a, _b;
399
+ var details = (_b = (_a = record) === null || _a === void 0 ? void 0 : _a[qunjSealKey]) === null || _b === void 0 ? void 0 : _b.details;
400
+ (Array.isArray(details) ? details : []).forEach(function (item) {
401
+ if (item === null || item === void 0 ? void 0 : item.sealNo) {
402
+ sealNos.add(item.sealNo + '');
403
+ }
404
+ });
405
+ });
406
+ // 注意:不能用 [...set] 展开符,低版本target编译后对Set会得到空数组
407
+ return Array.from(sealNos);
408
+ }
409
+ /** 根据文档 附件对应关系 获取已盖章的附件id列表 */
410
+ function getStampedAttachIdListByMap(currentDocAttachMap) {
411
+ if (currentDocAttachMap) {
412
+ try {
413
+ return Object.keys(JSON.parse(currentDocAttachMap)).filter(function (key) { return key !== 'needYjzrr'; });
414
+ }
415
+ catch (err) {
416
+ return [];
417
+ }
418
+ }
419
+ return [];
420
+ }
421
+ /** 根据文档 附件对应关系 获取文档id列表 */
422
+ function getDocumentIdListByMap(currentDocAttachMap) {
423
+ if (currentDocAttachMap) {
424
+ try {
425
+ var map_1 = JSON.parse(currentDocAttachMap);
426
+ var keys = Object.keys(map_1).filter(function (key) { return key !== 'needYjzrr'; });
427
+ return keys.map(function (key) {
428
+ return map_1[key];
429
+ });
430
+ }
431
+ catch (err) {
432
+ return [];
433
+ }
434
+ }
435
+ return [];
436
+ }
@@ -0,0 +1,40 @@
1
+ import { IElectronSignaturesProps, IElectronSignaturesItem } from '../interface';
2
+ interface IOptions {
3
+ /**
4
+ * 是否开启非受控模式
5
+ * 非受控模式开启后,数值的改变交由内部控制。外部只需要在合适的时机 获取数据即可
6
+ */
7
+ isUnControlled?: IElectronSignaturesProps['isUnControlled'];
8
+ /**
9
+ * 触发外部onChange事件
10
+ */
11
+ onValueChange?: IElectronSignaturesItem['onValueChange'];
12
+ /**
13
+ * 当前数据类型
14
+ */
15
+ dataType?: IElectronSignaturesItem['dataType'];
16
+ /**
17
+ * 新附件
18
+ */
19
+ records?: IElectronSignaturesItem['fileList'];
20
+ setRecords?: any;
21
+ /** 清空已选印章相关数据 */
22
+ onClearElectronListData?: any;
23
+ /** 清空已盖印章相关数据 */
24
+ onClearElectronSetting?: any;
25
+ deptId?: any;
26
+ secondDepId?: any;
27
+ electronicSealIdList?: any;
28
+ }
29
+ /**
30
+ * 是否需要给附件加盖电子印章
31
+ */
32
+ export default function useParseIsNeedElectronData(options: IOptions): {
33
+ /** 是否加盖电子印章改变时触发 */
34
+ onIsStampElectronChange: (this: any, checked: any, index: any) => void;
35
+ /** 当前列表数据中 是否有选择加盖电子印章的数据 */
36
+ isStampElectron: boolean;
37
+ /** 清空数据 */
38
+ clearAllElectronDataHandler: (this: any, dataType: any) => void;
39
+ };
40
+ export {};
@@ -0,0 +1,139 @@
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 useMemoizedFn from '../../utils/useMemoizedFn';
14
+ import usePrevious from '../../utils/usePrevious';
15
+ import { useEffect, useMemo } from 'react';
16
+ import cloneDeep from 'lodash/cloneDeep';
17
+ /**
18
+ * 是否需要给附件加盖电子印章
19
+ */
20
+ export default function useParseIsNeedElectronData(options) {
21
+ var onValueChange = options.onValueChange, records = options.records, dataType = options.dataType, setRecords = options.setRecords, onClearElectronListData = options.onClearElectronListData, onClearElectronSetting = options.onClearElectronSetting, deptId = options.deptId, secondDepId = options.secondDepId, electronicSealIdList = options.electronicSealIdList;
22
+ // 20241015: 这里的逻辑是。开发首次从没数据到有数据的过程中。
23
+ // 部门id会发生变化。这里的部门id变化是不需要清空契约锁数据的
24
+ // 这个地方需要组件内部处理下这个逻辑,虽然这个逻辑很奇怪
25
+ var electronicSealIdListPrevious = usePrevious(electronicSealIdList, function () { return true; });
26
+ // 是否加盖电子印章改变时触发
27
+ var onIsStampElectronChange = useMemoizedFn(function (checked, index) {
28
+ var _a, _b;
29
+ // 大多数情况下 当 onChange 触发时,需要判断
30
+ // 1. 非受控模式。那么组件内部应该直接进行控件 value 值的切换
31
+ // 2. 受控模式。那么组件内部的值应该由外部的 props 中的 value 决定而不应该自主切换。
32
+ var newRecords = cloneDeep((records === null || records === void 0 ? void 0 : records.slice()) || []);
33
+ var item = newRecords[index];
34
+ if (item) {
35
+ item.isElectronicSeal = checked ? 1 : 0;
36
+ // 这里的逻辑是 如果勾选了我们自己的电子印章 那么默认选中外部客户的电子印章平台
37
+ var defaultValue = item.defaultFmsIsElectronicSeal + '' === '1' ||
38
+ item.defaultFmsIsElectronicSeal + '' === '0'
39
+ ? item.defaultFmsIsElectronicSeal
40
+ : 1;
41
+ item.fmsIsElectronicSeal = checked ? defaultValue : 0;
42
+ // 20250422 盖户用合同章的逻辑与盖电子印章的逻辑互斥。
43
+ // 这里的逻辑是 如果勾选了我们自己的电子印章 那么默认不选中盖户用合同章
44
+ // const defaultOpeningContractSealValue =
45
+ // item.defaultOpeningContractSeal + '' === '1' ||
46
+ // item.defaultOpeningContractSeal + '' === '0'
47
+ // ? item.defaultOpeningContractSeal
48
+ // : 0;
49
+ // item.openingContractSeal = checked ? defaultOpeningContractSealValue : 0;
50
+ if (checked) {
51
+ item.openingContractSeal = 0;
52
+ }
53
+ // 这里的逻辑是 如果勾选了我们自己的电子印章 那么默认不选中推送银行
54
+ var defaultFmsIsPushBankValue = item.defaultFmsIsPushBank + '' === '1' ||
55
+ item.defaultFmsIsPushBank + '' === '0'
56
+ ? item.defaultFmsIsPushBank
57
+ : 0;
58
+ item.fmsIsPushBank = checked ? defaultFmsIsPushBankValue : 0;
59
+ }
60
+ setRecords(newRecords);
61
+ if (!dataType) {
62
+ console.error(i18next.t('必须传入数据类型'));
63
+ return;
64
+ }
65
+ // 如果同类型下的 所有的附件 都没有选择加盖电子印章
66
+ var isStampElectron = newRecords === null || newRecords === void 0 ? void 0 : newRecords.some(function (item) { return item.isElectronicSeal + '' === '1'; });
67
+ if (!isStampElectron) {
68
+ // 那么需要清空相关数据
69
+ // 那么需要清空下当前选中的电子印章数据相关数据
70
+ // 这里会跟电子印章列表产生耦合
71
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
72
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
73
+ onValueChange &&
74
+ onValueChange((_a = {},
75
+ _a[dataType] = __assign(__assign({ fileList: newRecords }, clearElectronListData), clearElectronSetting),
76
+ _a));
77
+ }
78
+ else {
79
+ onValueChange && onValueChange((_b = {}, _b[dataType] = { fileList: newRecords }, _b));
80
+ }
81
+ });
82
+ // 清空所有盖章数据
83
+ var clearAllElectronDataHandler = useMemoizedFn(function (dataType) {
84
+ var _a, _b;
85
+ var newRecords = cloneDeep((records === null || records === void 0 ? void 0 : records.slice()) || []);
86
+ newRecords.forEach(function (item) {
87
+ if (item) {
88
+ item.isElectronicSeal = 0;
89
+ item.fmsIsElectronicSeal = 0;
90
+ item.openingContractSeal = 0;
91
+ item.fmsIsPushBank = 0;
92
+ }
93
+ });
94
+ setRecords(newRecords);
95
+ if (!dataType) {
96
+ console.error(i18next.t('必须传入数据类型'));
97
+ return;
98
+ }
99
+ // 如果同类型下的 所有的附件 都没有选择加盖电子印章
100
+ var isStampElectron = newRecords === null || newRecords === void 0 ? void 0 : newRecords.some(function (item) { return item.isElectronicSeal + '' === '1'; });
101
+ if (!isStampElectron) {
102
+ // 那么需要清空相关数据
103
+ // 那么需要清空下当前选中的电子印章数据相关数据
104
+ // 这里会跟电子印章列表产生耦合
105
+ var clearElectronListData = onClearElectronListData === null || onClearElectronListData === void 0 ? void 0 : onClearElectronListData();
106
+ var clearElectronSetting = onClearElectronSetting === null || onClearElectronSetting === void 0 ? void 0 : onClearElectronSetting();
107
+ onValueChange &&
108
+ onValueChange((_a = {},
109
+ _a[dataType] = __assign(__assign({ fileList: newRecords }, clearElectronListData), clearElectronSetting),
110
+ _a));
111
+ }
112
+ else {
113
+ onValueChange && onValueChange((_b = {}, _b[dataType] = { fileList: newRecords }, _b));
114
+ }
115
+ });
116
+ // 当前列表数据中 是否有选择加盖电子印章的数据
117
+ var isStampElectron = useMemo(function () {
118
+ // 找到需要盖章的附件
119
+ return records === null || records === void 0 ? void 0 : records.some(function (item) { return item.isElectronicSeal + '' === '1'; });
120
+ }, [records]);
121
+ // 如果部门发生改变,需要清空契约锁数据
122
+ // 只有当本次更新是的契约锁数据 和上次 更新时的契约锁数据一致时,才更改
123
+ useEffect(function () {
124
+ if (electronicSealIdList &&
125
+ electronicSealIdList === electronicSealIdListPrevious) {
126
+ console.log(i18next.t('-----修改部门id,清空契约锁数据-----'));
127
+ clearAllElectronDataHandler(dataType);
128
+ }
129
+ // eslint-disable-next-line react-hooks/exhaustive-deps
130
+ }, [deptId, secondDepId]);
131
+ return {
132
+ /** 是否加盖电子印章改变时触发 */
133
+ onIsStampElectronChange: onIsStampElectronChange,
134
+ /** 当前列表数据中 是否有选择加盖电子印章的数据 */
135
+ isStampElectron: isStampElectron,
136
+ /** 清空数据 */
137
+ clearAllElectronDataHandler: clearAllElectronDataHandler,
138
+ };
139
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 群杰印章单体逻辑
3
+ */
4
+ import { IElectronSignaturesProps, IElectronSignaturesItem, IFileFieldsName } from '../interface';
5
+ interface IOptions {
6
+ /**
7
+ * 是否开启非受控模式
8
+ * 非受控模式开启后,数值的改变交由内部控制。外部只需要在合适的时机 获取数据即可
9
+ */
10
+ isUnControlled?: IElectronSignaturesProps['isUnControlled'];
11
+ /**
12
+ * 触发外部onChange事件
13
+ */
14
+ onValueChange?: IElectronSignaturesItem['onValueChange'];
15
+ /**
16
+ * 当前数据类型
17
+ */
18
+ dataType?: IElectronSignaturesItem['dataType'];
19
+ /**
20
+ * 新附件
21
+ */
22
+ records?: IElectronSignaturesItem['fileList'];
23
+ setRecords?: any;
24
+ /** 字段列表 */
25
+ fileFieldsNameRef: {
26
+ current: IFileFieldsName;
27
+ };
28
+ }
29
+ /**
30
+ * 是否需要给附件加盖群杰印章
31
+ */
32
+ export default function useParseIsNeedQunjData(options: IOptions): {
33
+ /** 是否加盖群杰印章改变时触发 */
34
+ onIsStampQunjChange: (this: any, checked: any, index: any) => void;
35
+ };
36
+ export {};