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.
- package/dist/App.js +315 -291
- package/dist/Demo.js +64 -43
- package/dist/DemoCom/BasicDemo.js +57 -56
- package/dist/DemoCom/CodeQueryDemo.js +3 -2
- package/dist/DemoCom/CollapseDemo.js +28 -27
- package/dist/DemoCom/DragSort.js +11 -10
- package/dist/DemoCom/FormDemo.js +36 -30
- package/dist/DemoCom/PrintContainerDemo.js +151 -150
- package/dist/DemoCom/PrintDemo.js +15 -14
- package/dist/DemoCom/SinaturesDemo.js +9 -8
- package/dist/DemoCom/SyhDemo.js +21 -20
- package/dist/DemoCom/TableAnalyse.js +34 -33
- package/dist/DemoCom/TableDemo.js +73 -69
- package/dist/DemoCom/TableDemo1.js +84 -34
- package/dist/DemoCom/TableDetail.d.ts +9 -0
- package/dist/DemoCom/TableDetail.js +259 -0
- package/dist/DemoCom/TestCom.js +22 -19
- package/dist/DemoCom/data.d.ts +110 -0
- package/dist/DemoCom/data.js +2308 -0
- package/dist/TableDemo/BasicTable.js +225 -25
- package/dist/TableDemo/EditableTable.js +146 -72
- package/dist/TableDemo/ModalTable.js +25 -24
- package/dist/TableDemo/ProEditableTable.js +30 -29
- package/dist/TableDemo/data.d.ts +34 -0
- package/dist/TableDemo/data.js +387 -10
- package/dist/TableDemo/index.js +3 -3
- package/dist/TreeDemo.js +8 -7
- package/dist/TreeSelectDemo.js +12 -8
- package/dist/UI/Form/index.d.ts +3 -0
- package/dist/UI/Form/index.js +347 -0
- package/dist/UI/Input/index.d.ts +17 -0
- package/dist/UI/Input/index.js +74 -0
- package/dist/UI/InputNumber/index.d.ts +3 -0
- package/dist/UI/InputNumber/index.js +45 -0
- package/dist/UI/OldForm/index.d.ts +9 -0
- package/dist/UI/OldForm/index.js +302 -0
- package/dist/UI/Select/EmpForQuitDemo.d.ts +15 -0
- package/dist/UI/Select/EmpForQuitDemo.js +120 -0
- package/dist/UI/Select/index.d.ts +10 -0
- package/dist/UI/Select/index.js +207 -0
- package/dist/UI/Table/BusinessListDemo.d.ts +15 -0
- package/dist/UI/Table/BusinessListDemo.js +227 -0
- package/dist/UI/Table/BusinessMemberDemo.d.ts +18 -0
- package/dist/UI/Table/BusinessMemberDemo.js +181 -0
- package/dist/UI/Table/index.d.ts +10 -0
- package/dist/UI/Table/index.js +850 -0
- package/dist/UI/TreeSelect/index.d.ts +3 -0
- package/dist/UI/TreeSelect/index.js +120 -0
- package/dist/UI/index.d.ts +2 -0
- package/dist/UI/index.js +34 -0
- package/dist/UploadDemo.js +27 -23
- package/dist/components/Button/button.d.ts +6 -0
- package/dist/components/Button/button.js +11 -4
- package/dist/components/Collapse/collapse.js +2 -1
- package/dist/components/DatePicker/data-picker.d.ts +3 -1
- package/dist/components/EnhanceSelect/index.d.ts +11 -1
- package/dist/components/EnhanceSelect/index.js +231 -49
- package/dist/components/EnhanceTree/index.js +4 -3
- package/dist/components/EnhanceTreeSelect/index.d.ts +5 -1
- package/dist/components/EnhanceTreeSelect/index.js +57 -7
- package/dist/components/Export/export.js +5 -4
- package/dist/components/Form/form.d.ts +11 -1
- package/dist/components/Form/form.js +5 -3
- package/dist/components/Input/input.d.ts +5 -3
- package/dist/components/Input/input.js +72 -3
- package/dist/components/InputNumber/input-number.js +3 -2
- package/dist/components/Layout/layout.d.ts +4 -4
- package/dist/components/Menu/menu.d.ts +1 -1
- package/dist/components/NumberCase/index.js +9 -7
- package/dist/components/Print/print.js +4 -3
- package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
- package/dist/components/PrintContainer/PrintModal.js +4 -3
- package/dist/components/PrintContainer/handle.d.ts +2 -4
- package/dist/components/PrintContainer/handle.js +3 -2
- package/dist/components/PrintContainer/lodop.js +2 -1
- package/dist/components/PrintContainer/print-container.js +74 -73
- package/dist/components/PrintContainer/service.js +5 -4
- package/dist/components/ProForm/hooks.d.ts +23 -0
- package/dist/components/ProForm/hooks.js +209 -0
- package/dist/components/ProForm/index.d.ts +9 -0
- package/dist/components/ProForm/index.js +168 -0
- package/dist/components/ProForm/interface.d.ts +200 -0
- package/dist/components/ProForm/interface.js +1 -0
- package/dist/components/ProForm/item.d.ts +13 -0
- package/dist/components/ProForm/item.js +222 -0
- package/dist/components/ProForm/items.d.ts +5 -0
- package/dist/components/ProForm/items.js +36 -0
- package/dist/components/ProForm/record-common-list.d.ts +18 -0
- package/dist/components/ProForm/record-common-list.js +83 -0
- package/dist/components/ProForm/search-drawer.d.ts +14 -0
- package/dist/components/ProForm/search-drawer.js +237 -0
- package/dist/components/ProForm/setting.d.ts +5 -0
- package/dist/components/ProForm/setting.js +12 -0
- package/dist/components/ProForm/useCommonSearch.d.ts +35 -0
- package/dist/components/ProForm/useCommonSearch.js +352 -0
- package/dist/components/ProFormList/index.d.ts +12 -0
- package/dist/components/ProFormList/index.js +34 -0
- package/dist/components/RangePicker/range-picker.js +5 -2
- package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
- package/dist/components/SortableCancel/sortable-cancel.js +2 -2
- package/dist/components/Table/components/FillDown.js +2 -1
- package/dist/components/Table/components/FilterDropdown.d.ts +1 -0
- package/dist/components/Table/components/FilterDropdown.js +36 -12
- package/dist/components/Table/hooks/useColumns.d.ts +5 -0
- package/dist/components/Table/hooks/useColumns.js +396 -22
- package/dist/components/Table/hooks/useDropRef.js +2 -1
- package/dist/components/Table/hooks/useScuRfresh.d.ts +3 -0
- package/dist/components/Table/hooks/useScuRfresh.js +22 -0
- package/dist/components/Table/hooks/useSelectSubtotal.js +5 -1
- package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
- package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
- package/dist/components/Table/index.d.ts +4 -0
- package/dist/components/Table/table-adddel-column.js +4 -3
- package/dist/components/Table/table-dynamic.d.ts +1 -0
- package/dist/components/Table/table-dynamic.js +447 -60
- package/dist/components/Table/table-enhance-cell.d.ts +3 -0
- package/dist/components/Table/table-enhance-cell.js +28 -8
- package/dist/components/Table/table-menu.d.ts +7 -0
- package/dist/components/Table/table-menu.js +359 -0
- package/dist/components/Table/table-resizable-title.js +1 -0
- package/dist/components/Table/table-sort.js +4 -3
- package/dist/components/Table/table.d.ts +16 -0
- package/dist/components/Table/table.js +241 -65
- package/dist/components/Table/utils/dom.js +2 -1
- package/dist/components/Table/utils/filterHandle.d.ts +1 -1
- package/dist/components/Table/utils/filterHandle.js +27 -12
- package/dist/components/Table/utils/getSummaryData.d.ts +1 -1
- package/dist/components/Table/utils/getSummaryData.js +279 -24
- package/dist/components/Table/utils/shallowEqual.js +2 -1
- package/dist/components/Table/utils/validate.js +25 -6
- package/dist/components/Tabs/tabs.d.ts +2 -0
- package/dist/components/Tabs/tabs.js +3 -1
- package/dist/components/TranslationButton/DownFile.d.ts +7 -0
- package/dist/components/TranslationButton/DownFile.js +95 -0
- package/dist/components/TranslationButton/PreviewFile.d.ts +5 -0
- package/dist/components/TranslationButton/PreviewFile.js +73 -0
- package/dist/components/TranslationButton/TranslationButton.d.ts +34 -0
- package/dist/components/TranslationButton/TranslationButton.js +245 -0
- package/dist/components/TranslationButton/hooks.d.ts +8 -0
- package/dist/components/TranslationButton/hooks.js +139 -0
- package/dist/components/TranslationButton/index.d.ts +4 -0
- package/dist/components/TranslationButton/index.js +4 -0
- package/dist/components/TreeSelect/index.d.ts +19 -0
- package/dist/components/TreeSelect/index.js +88 -0
- package/dist/components/Upload/upload-table.js +31 -26
- package/dist/components/Upload/upload.d.ts +20 -1
- package/dist/components/Upload/upload.js +172 -27
- package/dist/components/Upload/utils.d.ts +9 -2
- package/dist/components/Upload/utils.js +153 -38
- package/dist/components/UploadCustom/hooks/useDg.d.ts +6 -0
- package/dist/components/UploadCustom/hooks/useDg.js +55 -0
- package/dist/components/UploadSingle/upload-single.js +5 -4
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/Watermark/index.js +2 -0
- package/dist/components/Watermark/interface.d.ts +20 -0
- package/dist/components/Watermark/interface.js +1 -0
- package/dist/components/Watermark/utils.d.ts +1 -0
- package/dist/components/Watermark/utils.js +70 -0
- package/dist/components/Watermark/water.d.ts +50 -0
- package/dist/components/Watermark/water.js +66 -0
- package/dist/components/Watermark/watermark-div.d.ts +4 -0
- package/dist/components/Watermark/watermark-div.js +41 -0
- package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
- package/dist/components/Watermark/watermark-shadow.js +116 -0
- package/dist/components/Watermark/watermark.d.ts +3 -0
- package/dist/components/Watermark/watermark.js +102 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
- package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
- package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/images.js +2 -0
- package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/index.js +2 -0
- package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/service.js +101 -0
- package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
- package/dist/components/ZtIcon/index.js +2 -0
- package/dist/components/business/Analyse/index.js +12 -11
- package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
- package/dist/components/business/CodeQuery/component/TableList.js +5 -4
- package/dist/components/business/CodeQuery/hooks.js +2 -1
- package/dist/components/business/CodeQuery/index.js +2 -1
- package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
- package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
- package/dist/components/business/Common/UserInfo/index.js +5 -4
- package/dist/components/business/Common/UserPassword/index.js +14 -11
- package/dist/components/business/Common/validatePassword.d.ts +1 -1
- package/dist/components/business/Common/validatePassword.js +17 -7
- package/dist/components/business/DetailCard/index.js +7 -6
- package/dist/components/business/DetailHeader/index.js +7 -6
- package/dist/components/business/DetailList/index.js +5 -4
- package/dist/components/business/DgColumns/index.js +12 -11
- package/dist/components/business/ExportButton/index.js +6 -5
- package/dist/components/business/Footer/index.js +4 -1
- package/dist/components/business/GridList/item.d.ts +1 -1
- package/dist/components/business/List/item.d.ts +1 -1
- package/dist/components/business/NewList/item.d.ts +1 -1
- package/dist/components/business/NewList/item.js +1 -1
- package/dist/components/business/OperationBtnGroup/index.js +17 -16
- package/dist/components/business/SearchContainer/hooks/useDynamic.d.ts +2 -1
- package/dist/components/business/SearchContainer/hooks/useDynamic.js +6 -3
- package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
- package/dist/components/business/SearchContainer/hooks/useToggle.js +31 -12
- package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
- package/dist/components/business/SearchContainer/record-common-item.js +83 -0
- package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
- package/dist/components/business/SearchContainer/record-common-list.js +95 -0
- package/dist/components/business/SearchContainer/search-container.d.ts +22 -0
- package/dist/components/business/SearchContainer/search-container.js +66 -3
- package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-drawer.js +167 -13
- package/dist/components/business/SearchContainer/search-item.js +48 -5
- package/dist/components/business/SearchContainer/search-left.d.ts +8 -0
- package/dist/components/business/SearchContainer/search-left.js +105 -68
- package/dist/components/business/SearchContainer/search-right.d.ts +4 -0
- package/dist/components/business/SearchContainer/search-right.js +62 -5
- package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +18 -0
- package/dist/components/business/SearchContainer/useRecordCommonInit.js +258 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +8 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.js +145 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +37 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
- package/dist/components/business/SearchContainer/useTemplate.d.ts +20 -0
- package/dist/components/business/SearchContainer/useTemplate.js +347 -0
- package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
- package/dist/components/business/Signatures/components/CodeModal.d.ts +3 -0
- package/dist/components/business/Signatures/components/CodeModal.js +157 -0
- package/dist/components/business/Signatures/components/CompareResult.js +7 -6
- package/dist/components/business/Signatures/components/DetailTable.js +37 -34
- package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
- package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
- package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
- package/dist/components/business/Signatures/index.js +64 -53
- package/dist/components/business/SortList/sort-drawer.js +5 -4
- package/dist/components/business/Template/index.js +11 -10
- package/dist/components/electron-signatures/content.d.ts +9 -0
- package/dist/components/electron-signatures/content.js +1146 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
- package/dist/components/electron-signatures/demoComponents/data.d.ts +58 -0
- package/dist/components/electron-signatures/demoComponents/data.js +1307 -0
- package/dist/components/electron-signatures/demoComponents/detail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/detail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/index.d.ts +2 -0
- package/dist/components/electron-signatures/demoComponents/index.js +30 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/jgqrd.js +135 -0
- package/dist/components/electron-signatures/demoComponents/making.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/making.js +211 -0
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +675 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +1178 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/newDetail.js +283 -0
- package/dist/components/electron-signatures/demoComponents/preview.d.ts +3 -0
- package/dist/components/electron-signatures/demoComponents/preview.js +9 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjDetail.js +530 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/singleQjMaking.js +219 -0
- package/dist/components/electron-signatures/demoComponents/test.d.ts +6 -0
- package/dist/components/electron-signatures/demoComponents/test.js +119 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.d.ts +39 -0
- package/dist/components/electron-signatures/dgComponents/contract-comparison.js +53 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.d.ts +11 -0
- package/dist/components/electron-signatures/dgComponents/file-comparison-btn.js +180 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.d.ts +45 -0
- package/dist/components/electron-signatures/dgComponents/new-contract-comparison.js +68 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.d.ts +21 -0
- package/dist/components/electron-signatures/dgComponents/useContractColumns.js +171 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.d.ts +8 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +392 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.d.ts +52 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-batch-download.js +509 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.d.ts +8 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +59 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.d.ts +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-download.js +85 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.d.ts +9 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-firstLevelPerson.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item-detail.js +16 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.d.ts +20 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-item.js +47 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.d.ts +11 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +191 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.d.ts +15 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-setting.js +10 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.d.ts +7 -0
- package/dist/components/electron-signatures/electronComponents/last-qys-modal.js +42 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +43 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.d.ts +30 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +398 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +24 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +254 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.d.ts +3 -0
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +35 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.d.ts +7 -0
- package/dist/components/electron-signatures/fileComponents/file-operation.js +67 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.d.ts +12 -0
- package/dist/components/electron-signatures/fileComponents/file-type-select.js +10 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.d.ts +11 -0
- package/dist/components/electron-signatures/fileComponents/file-upload.js +146 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.d.ts +17 -0
- package/dist/components/electron-signatures/fileComponents/fileUtils.js +36 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.d.ts +10 -0
- package/dist/components/electron-signatures/fileComponents/new-file-operation.js +73 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.d.ts +13 -0
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +43 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.d.ts +38 -0
- package/dist/components/electron-signatures/fileComponents/useFileColumns.js +329 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.d.ts +19 -0
- package/dist/components/electron-signatures/fileComponents/useFileTypeColumns.js +72 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.d.ts +30 -0
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +132 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.d.ts +17 -0
- package/dist/components/electron-signatures/hooks/useMergeRecords.js +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.d.ts +49 -0
- package/dist/components/electron-signatures/hooks/useParseElectronListData.js +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +111 -0
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +436 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.d.ts +40 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedElectronData.js +139 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.d.ts +36 -0
- package/dist/components/electron-signatures/hooks/useParseIsNeedQunjData.js +48 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.d.ts +56 -0
- package/dist/components/electron-signatures/hooks/useParseQunjListData.js +204 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.d.ts +34 -0
- package/dist/components/electron-signatures/hooks/useParseQunjSingleData.js +110 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.d.ts +65 -0
- package/dist/components/electron-signatures/hooks/useParseRecords.js +165 -0
- package/dist/components/electron-signatures/index.d.ts +15 -0
- package/dist/components/electron-signatures/index.js +63 -0
- package/dist/components/electron-signatures/interface.d.ts +865 -0
- package/dist/components/electron-signatures/interface.js +57 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.d.ts +6 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-apply.js +8 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.d.ts +21 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-check.js +41 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +35 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +267 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.d.ts +24 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +355 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.d.ts +20 -0
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +66 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.d.ts +36 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +321 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.d.ts +10 -0
- package/dist/components/electron-signatures/translateComponents/TranslateButton.js +44 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.d.ts +22 -0
- package/dist/components/electron-signatures/translateComponents/useTranslateCom.js +50 -0
- package/dist/components/electron-signatures/utils.d.ts +26 -0
- package/dist/components/electron-signatures/utils.js +67 -0
- package/dist/components/utils/MyStorage.d.ts +36 -0
- package/dist/components/utils/MyStorage.js +120 -0
- package/dist/components/utils/ZtxkContext.d.ts +67 -0
- package/dist/components/utils/ZtxkContext.js +20 -0
- package/dist/components/utils/checkSealCoUse.d.ts +16 -0
- package/dist/components/utils/checkSealCoUse.js +83 -0
- package/dist/components/utils/fetch.d.ts +10 -0
- package/dist/components/utils/fetch.js +119 -0
- package/dist/components/utils/index.d.ts +9 -0
- package/dist/components/utils/index.js +11 -0
- package/dist/components/utils/processNumber.d.ts +12 -0
- package/dist/components/utils/processNumber.js +106 -0
- package/dist/components/utils/upload.js +6 -3
- package/dist/components/utils/useBaseContext.d.ts +23 -0
- package/dist/components/utils/useBaseContext.js +31 -0
- package/dist/components/utils/useMemoizedFn.d.ts +4 -0
- package/dist/components/utils/useMemoizedFn.js +19 -0
- package/dist/components/utils/usePrevious.d.ts +3 -0
- package/dist/components/utils/usePrevious.js +13 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +2205 -58
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +255 -86
- package/dist/locales/en-US.json +828 -0
- package/dist/locales/zh-CN.json +828 -0
- package/dist/request.js +7 -6
- package/package.json +13 -4
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
3
|
+
import cloneDeep from 'lodash/cloneDeep';
|
|
4
|
+
/**
|
|
5
|
+
* 是否需要给附件加盖群杰印章
|
|
6
|
+
*/
|
|
7
|
+
export default function useParseIsNeedQunjData(options) {
|
|
8
|
+
var onValueChange = options.onValueChange, records = options.records, dataType = options.dataType, setRecords = options.setRecords, fileFieldsNameRef = options.fileFieldsNameRef;
|
|
9
|
+
var _a = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, isQunj = _a.isQunj, qunjAddress = _a.qunjAddress, qunjSeal = _a.qunjSeal;
|
|
10
|
+
// 是否加盖群杰印章改变时触发
|
|
11
|
+
var onIsStampQunjChange = useMemoizedFn(function (checked, index) {
|
|
12
|
+
var _a;
|
|
13
|
+
// 大多数情况下 当 onChange 触发时,需要判断
|
|
14
|
+
// 1. 非受控模式。那么组件内部应该直接进行控件 value 值的切换
|
|
15
|
+
// 2. 受控模式。那么组件内部的值应该由外部的 props 中的 value 决定而不应该自主切换。
|
|
16
|
+
var newRecords = cloneDeep((records === null || records === void 0 ? void 0 : records.slice()) || []);
|
|
17
|
+
var item = newRecords[index];
|
|
18
|
+
if (item && isQunj) {
|
|
19
|
+
item[isQunj] = checked ? 1 : 0;
|
|
20
|
+
// 如果不盖群杰印章是否需要,清空已选择的群杰印章信息?
|
|
21
|
+
// 这里如果做简单一点,直接清空就好,不会出错。
|
|
22
|
+
// 最好的做法就是获取数据、提交数据的时候判断需不需要清空。这里简单做法,如果不盖直接清空
|
|
23
|
+
if (!checked && qunjAddress && qunjSeal) {
|
|
24
|
+
item[qunjAddress] = null;
|
|
25
|
+
item[qunjSeal] = null;
|
|
26
|
+
}
|
|
27
|
+
if (checked &&
|
|
28
|
+
qunjSeal &&
|
|
29
|
+
(!item[qunjSeal] || !Reflect.has(item[qunjSeal], 'isTakeOut'))) {
|
|
30
|
+
if (!item[qunjSeal]) {
|
|
31
|
+
item[qunjSeal] = {};
|
|
32
|
+
}
|
|
33
|
+
item[qunjSeal].isTakeOut = 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
setRecords(newRecords);
|
|
37
|
+
if (!dataType) {
|
|
38
|
+
console.error(i18next.t('必须传入数据类型'));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// 通知数据更新
|
|
42
|
+
onValueChange && onValueChange((_a = {}, _a[dataType] = { fileList: newRecords }, _a));
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
/** 是否加盖群杰印章改变时触发 */
|
|
46
|
+
onIsStampQunjChange: onIsStampQunjChange,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IElectronSignaturesProps, IElectronSignaturesItem, IQunjProps, IElectronSignaturesItemPublic } 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
|
+
qunjSeal?: IElectronSignaturesItem['qunjSeal'];
|
|
20
|
+
/**
|
|
21
|
+
* 当前选中的群杰印章盖章地址
|
|
22
|
+
*/
|
|
23
|
+
qunjAddress?: IElectronSignaturesItem['qunjAddress'];
|
|
24
|
+
/**
|
|
25
|
+
* 部门id
|
|
26
|
+
*/
|
|
27
|
+
deptId?: IElectronSignaturesItem['deptId'];
|
|
28
|
+
/**
|
|
29
|
+
* 流程id
|
|
30
|
+
*/
|
|
31
|
+
flowId?: IElectronSignaturesItem['flowId'];
|
|
32
|
+
/**
|
|
33
|
+
* 需要显示合同份数的流程id列表
|
|
34
|
+
* 群杰物理章那里 是否需要计算每个印章的用印次数 不能大于合同总份数的 多少倍
|
|
35
|
+
*/
|
|
36
|
+
contractNumFlowIds?: IElectronSignaturesProps['contractNumFlowIds'];
|
|
37
|
+
/** 默认是否勾选群杰印章-用印申请 */
|
|
38
|
+
isDefaultQunj?: IElectronSignaturesItem['isDefaultQunj'];
|
|
39
|
+
isSingleQj?: IElectronSignaturesItemPublic['isSingleQj'];
|
|
40
|
+
}
|
|
41
|
+
export default function useParseQunjListData(options: IOptions): {
|
|
42
|
+
currentQunjSeal: IQunjProps;
|
|
43
|
+
onQunjSealChange: (this: unknown, info: IQunjProps) => void;
|
|
44
|
+
/** 当前是否显示合同份数 */
|
|
45
|
+
isContranctNum: boolean;
|
|
46
|
+
qunjChecked: boolean;
|
|
47
|
+
setQunjChecked: (this: unknown, checked: boolean) => void;
|
|
48
|
+
currentQunjAddress: any;
|
|
49
|
+
onQunjAddressChange: (this: unknown, info: any, option?: any) => void;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* 用印次数是否合理
|
|
53
|
+
* 返回 true 合理 返回false 不合理
|
|
54
|
+
*/
|
|
55
|
+
export declare function countIsValidate(qunjSeal: IQunjProps, isAlert?: boolean): boolean;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,204 @@
|
|
|
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 { useState, useEffect, useMemo } from 'react';
|
|
14
|
+
import { message } from '../../../index';
|
|
15
|
+
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
16
|
+
import usePrevious from '../../utils/usePrevious';
|
|
17
|
+
import { FLOW_IDS } from '../utils';
|
|
18
|
+
export default function useParseQunjListData(options) {
|
|
19
|
+
var isUnControlled = options.isUnControlled, onValueChange = options.onValueChange, dataType = options.dataType, qunjSeal = options.qunjSeal, deptId = options.deptId, flowId = options.flowId, _a = options.contractNumFlowIds, contractNumFlowIds = _a === void 0 ? FLOW_IDS : _a, _b = options.isDefaultQunj, isDefaultQunj = _b === void 0 ? true : _b, qunjAddress = options.qunjAddress, isSingleQj = options.isSingleQj;
|
|
20
|
+
/**
|
|
21
|
+
* 当前是否显示合同份数
|
|
22
|
+
* 采购合同 销售合同 双边合同 部门间交易合同 需要展示合同份数 其他的不需要
|
|
23
|
+
*/
|
|
24
|
+
var isContranctNum = useMemo(function () {
|
|
25
|
+
return contractNumFlowIds.includes("" + flowId);
|
|
26
|
+
}, [contractNumFlowIds, flowId]);
|
|
27
|
+
/**
|
|
28
|
+
* 当前盖章地点选择
|
|
29
|
+
*/
|
|
30
|
+
var _c = useState(function () {
|
|
31
|
+
return qunjAddress;
|
|
32
|
+
}), currentQunjAddress = _c[0], setCurrentQunjAddress = _c[1];
|
|
33
|
+
// 盖章地点改变
|
|
34
|
+
var onQunjAddressChange = useMemoizedFn(function (info, option) {
|
|
35
|
+
var _a;
|
|
36
|
+
// if (isUnControlled) {
|
|
37
|
+
setCurrentQunjAddress(info);
|
|
38
|
+
// }
|
|
39
|
+
if (!dataType) {
|
|
40
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
var _b = (option || {}).qunjSeal, qunjSeal = _b === void 0 ? {} : _b;
|
|
44
|
+
onValueChange &&
|
|
45
|
+
onValueChange((_a = {},
|
|
46
|
+
_a[dataType] = {
|
|
47
|
+
qunjAddress: info,
|
|
48
|
+
qunjSeal: __assign(__assign({}, currentQunjSeal), qunjSeal),
|
|
49
|
+
},
|
|
50
|
+
_a));
|
|
51
|
+
});
|
|
52
|
+
// 当前选中的群杰物理章相关数据
|
|
53
|
+
var _d = useState(function () {
|
|
54
|
+
// 群杰默认选中内部用印 20241014
|
|
55
|
+
return qunjSeal ? qunjSeal : isDefaultQunj ? { isTakeOut: 0 } : qunjSeal;
|
|
56
|
+
}), currentQunjSeal = _d[0], setCurrentQunjSeal = _d[1];
|
|
57
|
+
// 当前是否勾选了群杰印章-用印申请
|
|
58
|
+
var _e = useState(function () {
|
|
59
|
+
return isDefaultQunj;
|
|
60
|
+
}), qunjChecked = _e[0], _setQunjChecked = _e[1];
|
|
61
|
+
// 手动切换群杰印章-用印申请
|
|
62
|
+
var setQunjChecked = useMemoizedFn(function (checked) {
|
|
63
|
+
var qunjProps = __assign(__assign({ isTakeOut: 0 }, (isContranctNum ? { contranctNum: 1 } : {})), { details: [] });
|
|
64
|
+
if (!checked) {
|
|
65
|
+
qunjProps.contranctNum = null;
|
|
66
|
+
}
|
|
67
|
+
_setQunjChecked(checked);
|
|
68
|
+
onQunjSealChange(qunjProps);
|
|
69
|
+
});
|
|
70
|
+
// 群杰物理章改变时触发
|
|
71
|
+
var onQunjSealChange = useMemoizedFn(function (info) {
|
|
72
|
+
var _a;
|
|
73
|
+
// 大多数情况下 当 onChange 触发时,需要判断
|
|
74
|
+
// 1. 非受控模式。那么组件内部应该直接进行控件 value 值的切换
|
|
75
|
+
// 2. 受控模式。那么组件内部的值应该由外部的 props 中的 value 决定而不应该自主切换。
|
|
76
|
+
var newQunjSeal = __assign(__assign({}, currentQunjSeal), info);
|
|
77
|
+
// 判断用印次数 是否合理
|
|
78
|
+
var qunjCountIsValidate = true;
|
|
79
|
+
if (isContranctNum) {
|
|
80
|
+
qunjCountIsValidate = countIsValidate(newQunjSeal);
|
|
81
|
+
}
|
|
82
|
+
// if (isUnControlled) {
|
|
83
|
+
setCurrentQunjSeal(newQunjSeal);
|
|
84
|
+
// }
|
|
85
|
+
if (!dataType) {
|
|
86
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
var newData = { qunjSeal: newQunjSeal, qunjCountIsValidate: qunjCountIsValidate };
|
|
90
|
+
// 如果是内部用印,那清楚选中的盖章地点数据
|
|
91
|
+
if (newQunjSeal.isTakeOut + '' === '0') {
|
|
92
|
+
newData.qunjAddress = null;
|
|
93
|
+
}
|
|
94
|
+
onValueChange &&
|
|
95
|
+
onValueChange((_a = {},
|
|
96
|
+
_a[dataType] = newData,
|
|
97
|
+
_a));
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* 如果是受控模式的话,直接将props的值 赋值给 内部变量
|
|
101
|
+
*/
|
|
102
|
+
useEffect(function () {
|
|
103
|
+
var _a;
|
|
104
|
+
// if (!isUnControlled) {
|
|
105
|
+
// 群杰默认选中内部用印 20241014
|
|
106
|
+
var newQunjSeal = qunjSeal
|
|
107
|
+
? qunjSeal
|
|
108
|
+
: isDefaultQunj
|
|
109
|
+
? { isTakeOut: 0 }
|
|
110
|
+
: qunjSeal;
|
|
111
|
+
setCurrentQunjSeal(newQunjSeal);
|
|
112
|
+
// 如果数据源中,群杰数据有值,那么需要默认勾选群杰章
|
|
113
|
+
// 这里去掉qunjSeal?.details 的逻辑会导致报错 不太理解为什么
|
|
114
|
+
if (Array.isArray(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) &&
|
|
115
|
+
(qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) &&
|
|
116
|
+
((_a = qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.details) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
117
|
+
_setQunjChecked(true);
|
|
118
|
+
}
|
|
119
|
+
// }
|
|
120
|
+
}, [isUnControlled, qunjSeal, isDefaultQunj]);
|
|
121
|
+
/**
|
|
122
|
+
* 如果是受控模式的话,直接将props的值 赋值给 内部变量
|
|
123
|
+
*/
|
|
124
|
+
useEffect(function () {
|
|
125
|
+
// if (!isUnControlled) {
|
|
126
|
+
setCurrentQunjAddress(qunjAddress);
|
|
127
|
+
// }
|
|
128
|
+
}, [isUnControlled, qunjAddress]);
|
|
129
|
+
// 监听是否选中群杰印章-用印申请 做一些数据处理
|
|
130
|
+
useEffect(function () {
|
|
131
|
+
if (!qunjChecked) {
|
|
132
|
+
// 需要把印章相关信息清空掉
|
|
133
|
+
}
|
|
134
|
+
}, [qunjChecked]);
|
|
135
|
+
// 20241015: 这里的逻辑是。开发首次从没数据到有数据的过程中。
|
|
136
|
+
// 部门id会发生变化。这里的部门id变化是不需要清空契约锁数据的
|
|
137
|
+
// 这个地方需要组件内部处理下这个逻辑,虽然这个逻辑很奇怪
|
|
138
|
+
var qunjSealPrevious = usePrevious(qunjSeal, function () { return true; });
|
|
139
|
+
// 监听流程id改变时,清空群杰印章信息
|
|
140
|
+
// 只有当本次更新的群杰数据 和上次 更新时的群杰数据一致时,才更改
|
|
141
|
+
useEffect(function () {
|
|
142
|
+
if (!isSingleQj && qunjSeal && qunjSeal === qunjSealPrevious) {
|
|
143
|
+
console.log(i18next.t('-----修改流程id,清空契约锁数据-----'));
|
|
144
|
+
var qunjProps = __assign(__assign({ isTakeOut: 0 }, (isContranctNum ? { contranctNum: 1 } : {})), { details: [] });
|
|
145
|
+
onQunjSealChange(qunjProps);
|
|
146
|
+
}
|
|
147
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
148
|
+
}, [flowId]);
|
|
149
|
+
// 监听部门id改变时,清空群杰印章信息(部门变了 印章列表会重新拉取 已选的群杰章需要一并清空)
|
|
150
|
+
// 只有当本次更新的群杰数据 和上次 更新时的群杰数据一致时,才更改
|
|
151
|
+
useEffect(function () {
|
|
152
|
+
if (!isSingleQj && qunjSeal && qunjSeal === qunjSealPrevious) {
|
|
153
|
+
console.log(i18next.t('-----修改部门id,清空群杰印章数据-----'));
|
|
154
|
+
var qunjProps = __assign(__assign({ isTakeOut: 0 }, (isContranctNum ? { contranctNum: 1 } : {})), { details: [] });
|
|
155
|
+
onQunjSealChange(qunjProps);
|
|
156
|
+
}
|
|
157
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
158
|
+
}, [deptId]);
|
|
159
|
+
return {
|
|
160
|
+
currentQunjSeal: currentQunjSeal,
|
|
161
|
+
onQunjSealChange: onQunjSealChange,
|
|
162
|
+
/** 当前是否显示合同份数 */
|
|
163
|
+
isContranctNum: isContranctNum,
|
|
164
|
+
qunjChecked: qunjChecked,
|
|
165
|
+
setQunjChecked: setQunjChecked,
|
|
166
|
+
currentQunjAddress: currentQunjAddress,
|
|
167
|
+
onQunjAddressChange: onQunjAddressChange,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* 用印次数是否合理
|
|
172
|
+
* 返回 true 合理 返回false 不合理
|
|
173
|
+
*/
|
|
174
|
+
export function countIsValidate(qunjSeal, isAlert) {
|
|
175
|
+
var _a;
|
|
176
|
+
if (isAlert === void 0) { isAlert = true; }
|
|
177
|
+
if (!qunjSeal) {
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
var contractNum = (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.contranctNum) || 1; // 总份数
|
|
181
|
+
var totalSealNum = 0; // 使用份数
|
|
182
|
+
(_a = qunjSeal.details) === null || _a === void 0 ? void 0 : _a.forEach(function (detail) {
|
|
183
|
+
totalSealNum += detail.sealCount || 0;
|
|
184
|
+
});
|
|
185
|
+
if (totalSealNum > contractNum * 4) {
|
|
186
|
+
if (isAlert) {
|
|
187
|
+
message.error(i18next.t('您的用印次数远超超过合理次数范围,请修改。'));
|
|
188
|
+
}
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
191
|
+
if (totalSealNum > contractNum * 3) {
|
|
192
|
+
if (isAlert) {
|
|
193
|
+
message.error(i18next.t('您的用印次数超过合理次数范围,请慎重确认!'));
|
|
194
|
+
}
|
|
195
|
+
return true;
|
|
196
|
+
}
|
|
197
|
+
if (totalSealNum > contractNum * 2) {
|
|
198
|
+
if (isAlert) {
|
|
199
|
+
message.error(i18next.t('您的用印次数已超过2倍合同数量,请确认用印数量是否正确。'));
|
|
200
|
+
}
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 单个附件的群杰操作逻辑
|
|
3
|
+
*/
|
|
4
|
+
import { IElectronSignaturesItem, IQunjProps, IFileFieldsName, IElectronSignaturesItemPublic } from '../interface';
|
|
5
|
+
interface IOptions {
|
|
6
|
+
/**
|
|
7
|
+
* 触发外部onChange事件
|
|
8
|
+
*/
|
|
9
|
+
onValueChange?: IElectronSignaturesItem['onValueChange'];
|
|
10
|
+
/**
|
|
11
|
+
* 当前数据类型
|
|
12
|
+
*/
|
|
13
|
+
dataType?: IElectronSignaturesItem['dataType'];
|
|
14
|
+
/**
|
|
15
|
+
* 新附件
|
|
16
|
+
*/
|
|
17
|
+
records?: IElectronSignaturesItem['fileList'];
|
|
18
|
+
setRecords?: any;
|
|
19
|
+
/** 字段列表 */
|
|
20
|
+
fileFieldsNameRef: {
|
|
21
|
+
current: IFileFieldsName;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* 是否显示合同份数
|
|
25
|
+
*/
|
|
26
|
+
isContranctNum?: boolean;
|
|
27
|
+
isSingleQj?: IElectronSignaturesItemPublic['isSingleQj'];
|
|
28
|
+
flowId?: string;
|
|
29
|
+
}
|
|
30
|
+
export default function useParseQunjSingleData(options: IOptions): {
|
|
31
|
+
onQunjAddressSingleChange: (this: unknown, data: any, index: number, qunjSeal?: any) => void;
|
|
32
|
+
onQunjSealSingleChange: (this: unknown, info: IQunjProps, index: number) => void;
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
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 { countIsValidate } from './useParseQunjListData';
|
|
14
|
+
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
15
|
+
import cloneDeep from 'lodash/cloneDeep';
|
|
16
|
+
import usePrevious from '../../utils/usePrevious';
|
|
17
|
+
import { useEffect } from 'react';
|
|
18
|
+
export default function useParseQunjSingleData(options) {
|
|
19
|
+
var onValueChange = options.onValueChange, dataType = options.dataType, records = options.records, setRecords = options.setRecords, fileFieldsNameRef = options.fileFieldsNameRef, isContranctNum = options.isContranctNum, isSingleQj = options.isSingleQj, flowId = options.flowId;
|
|
20
|
+
// 字段的key值
|
|
21
|
+
var _a = (fileFieldsNameRef === null || fileFieldsNameRef === void 0 ? void 0 : fileFieldsNameRef.current) || {}, _b = _a.qunjAddress, qunjAddressKey = _b === void 0 ? 'qunjAddress' : _b, _c = _a.qunjSeal, qunjSealKey = _c === void 0 ? 'qunjSeal' : _c;
|
|
22
|
+
/**
|
|
23
|
+
* 群杰盖章地点的改变
|
|
24
|
+
* @param data 修改的信息
|
|
25
|
+
* @param index 修改的数据索引
|
|
26
|
+
*/
|
|
27
|
+
var onQunjAddressSingleChange = useMemoizedFn(function (data, index, qunjSeal) {
|
|
28
|
+
var _a;
|
|
29
|
+
var newRecords = cloneDeep((records === null || records === void 0 ? void 0 : records.slice()) || []);
|
|
30
|
+
var item = newRecords[index];
|
|
31
|
+
// 更新群杰信息
|
|
32
|
+
if (item && qunjAddressKey) {
|
|
33
|
+
item[qunjAddressKey] = data;
|
|
34
|
+
item[qunjSealKey] = __assign(__assign({}, item[qunjSealKey]), qunjSeal);
|
|
35
|
+
}
|
|
36
|
+
setRecords(newRecords);
|
|
37
|
+
if (!dataType) {
|
|
38
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// 通知数据更新
|
|
42
|
+
onValueChange && onValueChange((_a = {}, _a[dataType] = { fileList: newRecords }, _a));
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* 群杰章信息改变
|
|
46
|
+
* 章子的信息、合同份数、用印类型等
|
|
47
|
+
*/
|
|
48
|
+
var onQunjSealSingleChange = useMemoizedFn(function (info, index) {
|
|
49
|
+
var _a;
|
|
50
|
+
var _b;
|
|
51
|
+
var newRecords = cloneDeep((records === null || records === void 0 ? void 0 : records.slice()) || []);
|
|
52
|
+
var item = newRecords[index];
|
|
53
|
+
if (!item) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
item[qunjSealKey] = __assign(__assign({}, item[qunjSealKey]), info);
|
|
57
|
+
// 判断用印次数 是否合理
|
|
58
|
+
var qunjCountIsValidate = true;
|
|
59
|
+
if (isContranctNum) {
|
|
60
|
+
qunjCountIsValidate = countIsValidate(item[qunjSealKey]);
|
|
61
|
+
}
|
|
62
|
+
item.qunjCountIsValidate = qunjCountIsValidate;
|
|
63
|
+
if (!dataType) {
|
|
64
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// 如果是内部用印,那清除选中的盖章地点数据
|
|
68
|
+
if (((_b = item[qunjSealKey]) === null || _b === void 0 ? void 0 : _b.isTakeOut) + '' === '0') {
|
|
69
|
+
item[qunjAddressKey] = null;
|
|
70
|
+
}
|
|
71
|
+
setRecords(newRecords);
|
|
72
|
+
// 通知数据更新
|
|
73
|
+
onValueChange && onValueChange((_a = {}, _a[dataType] = { fileList: newRecords }, _a));
|
|
74
|
+
});
|
|
75
|
+
// 20241015: 这里的逻辑是。开发首次从没数据到有数据的过程中。
|
|
76
|
+
// 部门id会发生变化。这里的部门id变化是不需要清空契约锁数据的
|
|
77
|
+
// 这个地方需要组件内部处理下这个逻辑,虽然这个逻辑很奇怪
|
|
78
|
+
var recordsPrevious = usePrevious(records, function () { return true; });
|
|
79
|
+
// 监听流程id改变时,清空群杰印章信息
|
|
80
|
+
// 只有当本次更新的群杰数据 和上次 更新时的群杰数据一致时,才更改
|
|
81
|
+
useEffect(function () {
|
|
82
|
+
var _a;
|
|
83
|
+
if (isSingleQj &&
|
|
84
|
+
records &&
|
|
85
|
+
// 这里尝试修复一个bug。流程id和fileList同时设置时,records是通过setState设置的。会滞后
|
|
86
|
+
// 这里取到的records数据会不是最新的
|
|
87
|
+
records.length > 0 &&
|
|
88
|
+
records === recordsPrevious) {
|
|
89
|
+
console.log(i18next.t('-----修改流程id,清空契约锁数据-----'));
|
|
90
|
+
var newRecords = cloneDeep((records === null || records === void 0 ? void 0 : records.slice()) || []);
|
|
91
|
+
newRecords.map(function (item) {
|
|
92
|
+
item[qunjSealKey] = __assign(__assign({ isTakeOut: 0 }, (isContranctNum ? { contranctNum: 1 } : {})), { details: [] });
|
|
93
|
+
item[qunjAddressKey] = null;
|
|
94
|
+
return item;
|
|
95
|
+
});
|
|
96
|
+
if (!dataType) {
|
|
97
|
+
console.log(i18next.t('必须传入数据类型'));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
setRecords(newRecords);
|
|
101
|
+
// 通知数据更新
|
|
102
|
+
onValueChange && onValueChange((_a = {}, _a[dataType] = { fileList: newRecords }, _a));
|
|
103
|
+
}
|
|
104
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
105
|
+
}, [flowId]);
|
|
106
|
+
return {
|
|
107
|
+
onQunjAddressSingleChange: onQunjAddressSingleChange,
|
|
108
|
+
onQunjSealSingleChange: onQunjSealSingleChange,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IElectronSignaturesProps, IElectronSignaturesItemPublic, IElectronSignaturesItem, IFileItem } from '../interface';
|
|
3
|
+
interface IOptions {
|
|
4
|
+
/**
|
|
5
|
+
* 是否开启非受控模式
|
|
6
|
+
* 非受控模式开启后,数值的改变交由内部控制。外部只需要在合适的时机 获取数据即可
|
|
7
|
+
*/
|
|
8
|
+
isUnControlled?: IElectronSignaturesProps['isUnControlled'];
|
|
9
|
+
/**
|
|
10
|
+
* 触发外部onChange事件
|
|
11
|
+
*/
|
|
12
|
+
onValueChange?: IElectronSignaturesItem['onValueChange'];
|
|
13
|
+
/**
|
|
14
|
+
* 新附件
|
|
15
|
+
*/
|
|
16
|
+
fileList?: IElectronSignaturesItem['fileList'];
|
|
17
|
+
/**
|
|
18
|
+
* 数据类型
|
|
19
|
+
*/
|
|
20
|
+
dataType?: IElectronSignaturesItem['dataType'];
|
|
21
|
+
/**
|
|
22
|
+
* 数据拆分规则
|
|
23
|
+
*/
|
|
24
|
+
fileSplitRules?: IElectronSignaturesItem['fileSplitRules'];
|
|
25
|
+
fileSplitStringRules?: IElectronSignaturesItem['fileSplitStringRules'];
|
|
26
|
+
isSingleQj?: IElectronSignaturesItemPublic['isSingleQj'];
|
|
27
|
+
isSupportNoAttachQj?: IElectronSignaturesItemPublic['isSupportNoAttachQj'];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 内部用来区分当前附件所属类型的KEY值
|
|
31
|
+
*/
|
|
32
|
+
export declare const DATA_TYPE_KEY = "__DATA_TYPE_KEY";
|
|
33
|
+
/**
|
|
34
|
+
* 附件数据处理
|
|
35
|
+
*/
|
|
36
|
+
export default function useParseRecords(options: IOptions): {
|
|
37
|
+
/** 当前的附件列表数据 */
|
|
38
|
+
records: IFileItem[];
|
|
39
|
+
/** 设置当前附件列表数据 调用这个方法 回触发onValueChange回调 */
|
|
40
|
+
setRecords: (this: any, info: any) => void;
|
|
41
|
+
/** 修改内部数据 只是修改数据 并不会触发onValueChange回调 需要自己手动触发 */
|
|
42
|
+
innerSetRecords: import("react").Dispatch<import("react").SetStateAction<IFileItem[]>>;
|
|
43
|
+
};
|
|
44
|
+
export declare function getColumnMergeProp(options: {
|
|
45
|
+
record: any;
|
|
46
|
+
records: any;
|
|
47
|
+
dataTypeSort: any;
|
|
48
|
+
index: any;
|
|
49
|
+
}): {
|
|
50
|
+
/** 当前的数据类型 */
|
|
51
|
+
currentDataType: any;
|
|
52
|
+
/** 合并规则 */
|
|
53
|
+
props: {
|
|
54
|
+
rowSpan: any;
|
|
55
|
+
};
|
|
56
|
+
/** 当前数据类型之前的数据长度 */
|
|
57
|
+
preDataTypeRecordsLength: number;
|
|
58
|
+
};
|
|
59
|
+
export declare function getColumnRecordProp(options: {
|
|
60
|
+
record: any;
|
|
61
|
+
}): {
|
|
62
|
+
/** 当前的数据类型 */
|
|
63
|
+
currentDataType: any;
|
|
64
|
+
};
|
|
65
|
+
export {};
|