ztxkui 4.2.23-605 → 4.2.23-606

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 (25) hide show
  1. package/dist/UI/Detail/index.js +4 -1
  2. package/dist/UI/Table/EditTable.js +1 -3
  3. package/dist/components/Table/table-menu.js +1 -1
  4. package/dist/components/electron-signatures/content.js +1 -1
  5. package/dist/components/electron-signatures/demoComponents/making.js +3 -1
  6. package/dist/components/electron-signatures/demoComponents/makingData.d.ts +8 -1
  7. package/dist/components/electron-signatures/demoComponents/makingData.js +11 -3
  8. package/dist/components/electron-signatures/electronComponents/electron-seal-detail.js +33 -5
  9. package/dist/components/electron-signatures/electronComponents/electron-seal-list.js +136 -25
  10. package/dist/components/electron-signatures/index.d.ts +4 -0
  11. package/dist/components/electron-signatures/index.js +17 -4
  12. package/dist/components/electron-signatures/interface.d.ts +10 -0
  13. package/dist/components/electron-signatures/qunjComponents/qunj-detail.d.ts +4 -0
  14. package/dist/components/electron-signatures/qunjComponents/qunj-detail.js +29 -9
  15. package/dist/components/electron-signatures/qunjComponents/qunj-list.js +166 -3
  16. package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +115 -88
  17. package/dist/components/utils/ZtxkContext.d.ts +16 -0
  18. package/dist/components/utils/ZtxkContext.js +4 -0
  19. package/dist/components/utils/useBaseContext.d.ts +4 -0
  20. package/dist/constants.d.ts +1 -1
  21. package/dist/constants.js +1 -1
  22. package/dist/index.css +329 -0
  23. package/dist/index.css.map +1 -1
  24. package/dist/main.js +8 -0
  25. package/package.json +1 -1
@@ -2,6 +2,7 @@ import i18next from 'ztxkutils/dist/i18next';
2
2
  import React, { useMemo, useRef } from 'react';
3
3
  import { DetailHeader, OperationBtnGroup, Container, Button, InputNumber, Input, Tabs, Dropdown, DatePicker, Collapse, Modal, Tooltip, } from '../../index.build';
4
4
  import dayjs from 'dayjs';
5
+ import EditTable from '../Table/EditTable';
5
6
  var Detail = function () {
6
7
  var rangeDatesRef = useRef(null);
7
8
  var items = useMemo(function () {
@@ -224,7 +225,9 @@ var Detail = function () {
224
225
  React.createElement(Collapse.Panel, { key: "1", header: "\u9762\u677F1" }, "\u9762\u677F1"),
225
226
  React.createElement(Collapse.Panel, { key: "2", header: "\u9762\u677F2" }, "\u9762\u677F2")),
226
227
  React.createElement(Button, { onClick: function () { return setVisible(true); } }, "\u6253\u5F00\u5F39\u6846"),
227
- React.createElement(Modal, { title: "\u5F39\u6846\u6807\u9898", loading: false, visible: visible, onCancel: function () { return setVisible(false); } }, "\u6211\u662F\u5F39\u6846\u5185\u5BB9"),
228
+ React.createElement(Modal, { title: "\u5F39\u6846\u6807\u9898", loading: false, visible: visible, onCancel: function () { return setVisible(false); } },
229
+ "\u6211\u662F\u5F39\u6846\u5185\u5BB9",
230
+ React.createElement(EditTable, null)),
228
231
  React.createElement(Tooltip, { title: "\u6211\u662F\u63D0\u793A" },
229
232
  React.createElement(Button, null, "\u6211\u662F\u6309\u94AE"))));
230
233
  };
@@ -626,9 +626,7 @@ export default function EditTable() {
626
626
  // defaultInnerPageSize={10}
627
627
  virtualTableKey: "single-110011",
628
628
  // 是否选择
629
- isChoice: true, choiceMode: "radio", selectedRowKeys: selectedRowKeys, onSelectedRowChange: onSelectedRowChange, onChange: onChange, summaryFixed: true,
630
- // hideIndexColumnEditBtn
631
- summaryConfig: [
629
+ isChoice: true, choiceMode: "radio", selectedRowKeys: selectedRowKeys, onSelectedRowChange: onSelectedRowChange, onChange: onChange, summaryFixed: true, hideIndexColumnEditBtn: false, summaryConfig: [
632
630
  {
633
631
  type: 'subtotal',
634
632
  fields: [
@@ -296,7 +296,7 @@ var TableMenu = forwardRef(function (_a, ref) {
296
296
  onEditableSave || !isContextMenuFullscreen ? null : (React.createElement(Item, { data: "fullscreen", onClick: onMenuItemClick }, isFull ? i18next.t('退出全屏') : i18next.t('全屏')))),
297
297
  React.createElement(Modal, { width: "80%", title: i18next.t('详情'), visible: visible, onCancel: onCancel,
298
298
  // stick
299
- mask: false, loading: false, className: className, footer: React.createElement(Button, { type: "primary", onClick: onCancel }, i18next.t('确定')), getContainer: false },
299
+ mask: false, loading: false, className: className, footer: React.createElement(Button, { type: "primary", onClick: onCancel }, i18next.t('确定')) },
300
300
  React.createElement("div", { style: { maxHeight: '70vh', minWidth: '800px', overflow: 'auto' } },
301
301
  React.createElement("div", { className: "zt-table-detail-grid" }, record && renderItem(items))))));
302
302
  });
@@ -111,7 +111,7 @@ var ElectronSignatures = function (props) {
111
111
  // fmsIsElectronicSealPushLabel = '推送银行',
112
112
  _j = props.fmsIsElectronicSealPushLabel,
113
113
  // fmsIsElectronicSealPushLabel = '推送银行',
114
- fmsIsElectronicSealPushLabel = _j === void 0 ? i18next.t('加盖银行签章') : _j, _k = props.openingContractSealLabel, openingContractSealLabel = _k === void 0 ? i18next.t('盖光盈电子章') : _k, isSingleQj = props.isSingleQj, _l = props.isQjUseModal, isQjUseModal = _l === void 0 ? true : _l, defaultJustNeedQj = props.defaultJustNeedQj, isDeleteAllFileWhenJustUseQj = props.isDeleteAllFileWhenJustUseQj, _m = props.isShowQysWhenNeedNotQys, isShowQysWhenNeedNotQys = _m === void 0 ? true : _m, _o = props.isControlNeedQys, isControlNeedQys = _o === void 0 ? true : _o, isDeletePlaceholderFileData = props.isDeletePlaceholderFileData, isSupportNoAttachQj = props.isSupportNoAttachQj, caseId = props.caseId, _p = props.isChoiseChangeTemplateValid, isChoiseChangeTemplateValid = _p === void 0 ? true : _p, _q = props.isToggleQys, isToggleQys = _q === void 0 ? false : _q, _r = props.isQjVerifyCode, isQjVerifyCode = _r === void 0 ? false : _r, _s = props.isNewQys, isNewQys = _s === void 0 ? false : _s, _t = props.isShowBatchUseElectronicSealBtn, isShowBatchUseElectronicSealBtn = _t === void 0 ? true : _t, isShowBatchUseOpeningContractSealBtn = props.isShowBatchUseOpeningContractSealBtn, isShowOpeningContractSeal = props.isShowOpeningContractSeal, customButtons = props.customButtons, goWorkflowSeal = props.goWorkflowSeal, isShowSealApply = props.isShowSealApply, otherColumns = props.otherColumns, isShowOpeningContractSealNotRelyQys = props.isShowOpeningContractSealNotRelyQys, isNoWatermarkProcess = props.isNoWatermarkProcess, qunjListRenderFilter = props.qunjListRenderFilter, sealDownloadFlowStatus = props.sealDownloadFlowStatus, resetProps = __rest(props, ["request", "isTranslation", "previewUrl", "isUnControlled", "contractNumFlowIds", "fileUploadProps", "isShowFileUpload", "isShowFileUploadIndependence", "otherOptions", "fileBaseUrl", "apiBaseUrl", "electronHandleRef", "onValueChange", "isValidateSuccess", "refreshCode", "onCheckedComparison", "onFileTypeChangeGetItem", "tableScroll", "getCreateTimeHand", "isShowElectronBatchBtn", "isShowDownloadBatchBtn", "isShowBatchDeleteBtn", "isShowBatchDeleteBtnIndependence", "beforeBatchDelete", "isShowBatchPreviewBtn", "isShowFileComparisonBtn", "batchDownloadZipName", "isShowDoubleSignedBatchBtn", "isShowFileType", "isShowFileTypeMerge", "fmsIsElectronicSealLabel", "fmsIsElectronicSealPushLabel", "openingContractSealLabel", "isSingleQj", "isQjUseModal", "defaultJustNeedQj", "isDeleteAllFileWhenJustUseQj", "isShowQysWhenNeedNotQys", "isControlNeedQys", "isDeletePlaceholderFileData", "isSupportNoAttachQj", "caseId", "isChoiseChangeTemplateValid", "isToggleQys", "isQjVerifyCode", "isNewQys", "isShowBatchUseElectronicSealBtn", "isShowBatchUseOpeningContractSealBtn", "isShowOpeningContractSeal", "customButtons", "goWorkflowSeal", "isShowSealApply", "otherColumns", "isShowOpeningContractSealNotRelyQys", "isNoWatermarkProcess", "qunjListRenderFilter", "sealDownloadFlowStatus"]);
114
+ fmsIsElectronicSealPushLabel = _j === void 0 ? i18next.t('加盖银行签章') : _j, _k = props.openingContractSealLabel, openingContractSealLabel = _k === void 0 ? i18next.t('盖光盈电子章') : _k, isSingleQj = props.isSingleQj, _l = props.isQjUseModal, isQjUseModal = _l === void 0 ? true : _l, defaultJustNeedQj = props.defaultJustNeedQj, isDeleteAllFileWhenJustUseQj = props.isDeleteAllFileWhenJustUseQj, _m = props.isShowQysWhenNeedNotQys, isShowQysWhenNeedNotQys = _m === void 0 ? true : _m, _o = props.isControlNeedQys, isControlNeedQys = _o === void 0 ? true : _o, isDeletePlaceholderFileData = props.isDeletePlaceholderFileData, isSupportNoAttachQj = props.isSupportNoAttachQj, caseId = props.caseId, _p = props.isChoiseChangeTemplateValid, isChoiseChangeTemplateValid = _p === void 0 ? true : _p, _q = props.isToggleQys, isToggleQys = _q === void 0 ? false : _q, _r = props.isQjVerifyCode, isQjVerifyCode = _r === void 0 ? false : _r, _s = props.isNewQys, isNewQys = _s === void 0 ? false : _s, isNewElectronSealStyle = props.isNewElectronSealStyle, isNewQunjSealStyle = props.isNewQunjSealStyle, _t = props.isShowBatchUseElectronicSealBtn, isShowBatchUseElectronicSealBtn = _t === void 0 ? true : _t, isShowBatchUseOpeningContractSealBtn = props.isShowBatchUseOpeningContractSealBtn, isShowOpeningContractSeal = props.isShowOpeningContractSeal, customButtons = props.customButtons, goWorkflowSeal = props.goWorkflowSeal, isShowSealApply = props.isShowSealApply, otherColumns = props.otherColumns, isShowOpeningContractSealNotRelyQys = props.isShowOpeningContractSealNotRelyQys, isNoWatermarkProcess = props.isNoWatermarkProcess, qunjListRenderFilter = props.qunjListRenderFilter, sealDownloadFlowStatus = props.sealDownloadFlowStatus, resetProps = __rest(props, ["request", "isTranslation", "previewUrl", "isUnControlled", "contractNumFlowIds", "fileUploadProps", "isShowFileUpload", "isShowFileUploadIndependence", "otherOptions", "fileBaseUrl", "apiBaseUrl", "electronHandleRef", "onValueChange", "isValidateSuccess", "refreshCode", "onCheckedComparison", "onFileTypeChangeGetItem", "tableScroll", "getCreateTimeHand", "isShowElectronBatchBtn", "isShowDownloadBatchBtn", "isShowBatchDeleteBtn", "isShowBatchDeleteBtnIndependence", "beforeBatchDelete", "isShowBatchPreviewBtn", "isShowFileComparisonBtn", "batchDownloadZipName", "isShowDoubleSignedBatchBtn", "isShowFileType", "isShowFileTypeMerge", "fmsIsElectronicSealLabel", "fmsIsElectronicSealPushLabel", "openingContractSealLabel", "isSingleQj", "isQjUseModal", "defaultJustNeedQj", "isDeleteAllFileWhenJustUseQj", "isShowQysWhenNeedNotQys", "isControlNeedQys", "isDeletePlaceholderFileData", "isSupportNoAttachQj", "caseId", "isChoiseChangeTemplateValid", "isToggleQys", "isQjVerifyCode", "isNewQys", "isNewElectronSealStyle", "isNewQunjSealStyle", "isShowBatchUseElectronicSealBtn", "isShowBatchUseOpeningContractSealBtn", "isShowOpeningContractSeal", "customButtons", "goWorkflowSeal", "isShowSealApply", "otherColumns", "isShowOpeningContractSealNotRelyQys", "isNoWatermarkProcess", "qunjListRenderFilter", "sealDownloadFlowStatus"]);
115
115
  var selectRows = useRef(null);
116
116
  // 批量更新时用于合并 onValueChange 调用,避免多次触发外部回调
117
117
  var batchUpdateRef = useRef({
@@ -163,7 +163,9 @@ var Making = function () {
163
163
  electronHandleRef: electronHandleRef, isValidateSuccess: function () {
164
164
  // 最后会调用一个接口 验证下是否所选的电子印章都已经盖了章 如果没有盖章 就会弹出一个选择框 让用户重新选择 重新选择后 如果用户把所有未盖章的电子印章都取消勾选的话 那么就会调用这个方法 说明校验通过 可以进行下一步
165
165
  console.log(i18next.t('最终校验通过了!!!'));
166
- } })),
166
+ },
167
+ // 是否显示合同分数
168
+ isContranctNum: true })),
167
169
  React.createElement("button", { onClick: function () {
168
170
  setParams(function (preParams) {
169
171
  return __assign(__assign({}, preParams), { deptId: preParams.deptId === '1514842376723976194'
@@ -270,10 +270,17 @@ declare const historyData1: {
270
270
  }[];
271
271
  qunjSeal: {
272
272
  vertifyCode: number;
273
- contranctNum: any;
273
+ contranctNum: number;
274
274
  isTakeOut: number;
275
275
  details: {
276
+ companyType: string;
277
+ companyTypeName: string;
278
+ sealName: string;
276
279
  sealNo: string;
280
+ areaType: number;
281
+ areaTypeName: string;
282
+ useType: number;
283
+ useTypeName: string;
277
284
  sealCount: number;
278
285
  }[];
279
286
  };
@@ -575,7 +575,8 @@ var historyData1 = [
575
575
  needQj: 1,
576
576
  deptId: '1514842459376930817',
577
577
  memberId: null,
578
- flowId: 'scm_order_contract_ccwlht',
578
+ // flowId: 'scm_order_contract_ccwlht',
579
+ flowId: 'scm_order_contract_cght',
579
580
  contractId: null,
580
581
  caseId: 'ab0f7dff-0294-4187-bffe-bf489101546b',
581
582
  docAttachMap: null,
@@ -610,11 +611,18 @@ var historyData1 = [
610
611
  ],
611
612
  qunjSeal: {
612
613
  vertifyCode: 281109,
613
- contranctNum: null,
614
+ contranctNum: 3,
614
615
  isTakeOut: 0,
615
616
  details: [
616
617
  {
617
- sealNo: 'YZ-2025-022',
618
+ companyType: 'K000',
619
+ companyTypeName: '浙商中拓集团股份有限公司',
620
+ sealName: '浙商中拓集团股份有限公司公章(杭州)',
621
+ sealNo: 'YZ-2023-008',
622
+ areaType: 1,
623
+ areaTypeName: '杭州',
624
+ useType: 3,
625
+ useTypeName: '公章',
618
626
  sealCount: 1,
619
627
  },
620
628
  ],
@@ -1,5 +1,14 @@
1
1
  import i18next from 'ztxkutils/dist/i18next';
2
- import React, { memo } from 'react';
2
+ import React, { memo, useContext } from 'react';
3
+ import { ElectronSignaturesContext } from '..';
4
+ /** 公司简称 fallback 到全称 */
5
+ function getOwnerShortName(item) {
6
+ return (item === null || item === void 0 ? void 0 : item.ownerShortName) || (item === null || item === void 0 ? void 0 : item.ownerName) || '';
7
+ }
8
+ /** 印章简称 fallback 到全称 */
9
+ function getSealShortName(item) {
10
+ return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
11
+ }
3
12
  export var NoUseElectronSeal = function () {
4
13
  return (React.createElement("div", { style: {
5
14
  height: '100%',
@@ -13,6 +22,7 @@ export var NoUseElectronSeal = function () {
13
22
  */
14
23
  var ElectronSealDetail = function (_a) {
15
24
  var sealList = _a.sealList, value = _a.value;
25
+ var isNewElectronSealStyle = useContext(ElectronSignaturesContext).isNewElectronSealStyle;
16
26
  // 电子印章数据没有加载完成或者加载出错
17
27
  if (!Array.isArray(sealList)) {
18
28
  return null;
@@ -21,11 +31,29 @@ var ElectronSealDetail = function (_a) {
21
31
  if (sealList.length === 0) {
22
32
  return React.createElement(NoUseElectronSeal, null);
23
33
  }
24
- // 整理数据 以ownerName维度,拆分数据
25
- return Array.isArray(value) && value.length > 0 ? (React.createElement("div", { className: "electron-seal-detail--wrap" }, value === null || value === void 0 ? void 0 : value.map(function (id) {
34
+ // 非编辑模式下,没有选中任何印章
35
+ if (!Array.isArray(value) || value.length === 0) {
36
+ return React.createElement(NoUseElectronSeal, null);
37
+ }
38
+ // 新版展示样式:按照"公司简称 印章简称"模式展示,带"已选印章"标题
39
+ if (isNewElectronSealStyle) {
40
+ return (React.createElement("div", { className: "electron-seal-detail-new--wrap" },
41
+ React.createElement("div", { className: "seal-selected-title" }, "\u5DF2\u9009\u5370\u7AE0"),
42
+ value.map(function (id) {
43
+ var _a;
44
+ var completeItem = (_a = sealList === null || sealList === void 0 ? void 0 : sealList.find) === null || _a === void 0 ? void 0 : _a.call(sealList, function (sealItem) { return sealItem.sealId === id; });
45
+ return (React.createElement("div", { key: id, className: "seal-selected-item", title: (((completeItem === null || completeItem === void 0 ? void 0 : completeItem.ownerName) || '') + " " + ((completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName) || '')).trim() },
46
+ getOwnerShortName(completeItem),
47
+ " ",
48
+ getSealShortName(completeItem)));
49
+ })));
50
+ }
51
+ // 旧版展示样式:只显示印章简称
52
+ return (React.createElement("div", { className: "electron-seal-detail--wrap" }, value === null || value === void 0 ? void 0 : value.map(function (id) {
26
53
  var _a;
27
54
  var completeItem = (_a = sealList === null || sealList === void 0 ? void 0 : sealList.find) === null || _a === void 0 ? void 0 : _a.call(sealList, function (sealItem) { return sealItem.sealId === id; });
28
- return (React.createElement("div", { key: id, className: "electron-seal-detail--wrap__item" }, completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName));
29
- }))) : (React.createElement(NoUseElectronSeal, null));
55
+ var displayName = (completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealShortName) || (completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName);
56
+ return (React.createElement("div", { key: id, className: "electron-seal-detail--wrap__item", title: completeItem === null || completeItem === void 0 ? void 0 : completeItem.sealName }, displayName));
57
+ })));
30
58
  };
31
59
  export default memo(ElectronSealDetail);
@@ -20,42 +20,153 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import React, { memo, useMemo } from 'react';
23
+ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
24
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
25
+ to[j] = from[i];
26
+ return to;
27
+ };
28
+ import React, { memo, useMemo, useState, useContext, useEffect } from 'react';
24
29
  import { Checkbox, Collapse } from '../../../index.build';
30
+ import { ElectronSignaturesContext } from '..';
31
+ import useBaseContext from '../../utils/useBaseContext';
32
+ /** 公司简称优先排序关键词(按指定顺序排前) */
33
+ var PRIORITY_OWNERS = ['浙商中拓', '浙江中拓', '湖南中拓', '海南中拓'];
34
+ /** 按优先级排序公司简称列表 */
35
+ function sortOwners(owners) {
36
+ var prioritized = PRIORITY_OWNERS.filter(function (o) { return owners.includes(o); });
37
+ var rest = owners.filter(function (o) { return !PRIORITY_OWNERS.includes(o); });
38
+ return __spreadArray(__spreadArray([], prioritized), rest);
39
+ }
40
+ /** 公司简称 fallback 到全称 */
41
+ function getOwnerShortName(item) {
42
+ return (item === null || item === void 0 ? void 0 : item.ownerShortName) || (item === null || item === void 0 ? void 0 : item.ownerName) || '';
43
+ }
44
+ /** 印章简称 fallback 到全称 */
45
+ function getSealShortName(item) {
46
+ return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
47
+ }
25
48
  /**
26
49
  * 电子签章选择列表
27
50
  */
28
51
  var ElectronSealList = function (_a) {
29
- var sealList = _a.sealList, onChange = _a.onChange, isEdit = _a.isEdit, resetProp = __rest(_a, ["sealList", "onChange", "isEdit"]);
30
- // 整理数据 以ownerName维度,拆分数据
31
- var sealListMemo = useMemo(function () {
52
+ var sealList = _a.sealList, onChange = _a.onChange, isEdit = _a.isEdit, value = _a.value, resetProp = __rest(_a, ["sealList", "onChange", "isEdit", "value"]);
53
+ var isNewElectronSealStyle = useContext(ElectronSignaturesContext).isNewElectronSealStyle;
54
+ var _b = useBaseContext().electronSealTabTrigger, electronSealTabTrigger = _b === void 0 ? 'hover' : _b;
55
+ // 新版:以公司简称维度拆分数据
56
+ var _c = useMemo(function () {
32
57
  if (!Array.isArray(sealList)) {
33
58
  return {
34
- ownerNameList: [],
35
- result: {},
59
+ ownerList: [],
60
+ ownerMap: {},
36
61
  };
37
62
  }
38
- var ownerNameList = Array.from(new Set(sealList.map(function (item) { return item.ownerName; })));
39
- var result = {};
40
- ownerNameList.forEach(function (ownerName) {
41
- result[ownerName] = sealList.filter(function (item) { return item.ownerName === ownerName; });
63
+ var map = {};
64
+ sealList.forEach(function (item) {
65
+ var name = getOwnerShortName(item);
66
+ if (!map[name])
67
+ map[name] = [];
68
+ map[name].push(item);
42
69
  });
43
70
  return {
44
- ownerNameList: ownerNameList,
45
- result: result,
71
+ ownerList: sortOwners(Object.keys(map)),
72
+ ownerMap: map,
46
73
  };
47
- }, [sealList]);
48
- var ownerNameList = sealListMemo.ownerNameList, result = sealListMemo.result;
49
- return ownerNameList.length === 0 ? null : (React.createElement(Checkbox.Group, __assign({ onChange: function (e) {
50
- onChange && onChange(e);
51
- }, disabled: !isEdit, className: "electron-seal-list--wrap" }, resetProp),
52
- React.createElement(Collapse, { defaultActiveKey: ownerNameList.map(function (item, index) { return index; }), style: { width: '100%' } }, ownerNameList.map(function (ownerName, index) {
53
- var _a;
54
- return (React.createElement(Collapse.Panel, { key: index,
55
- // header={ownerName}
56
- header: React.createElement("div", { className: "electron-seal-list--owner-name" }, ownerName) }, (_a = result[ownerName]) === null || _a === void 0 ? void 0 : _a.map(function (item) {
57
- return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
58
- })));
59
- }))));
74
+ }, [sealList]), ownerList = _c.ownerList, ownerMap = _c.ownerMap;
75
+ // 旧版:以 ownerName 维度拆分数据
76
+ var _d = useMemo(function () {
77
+ if (!Array.isArray(sealList)) {
78
+ return { ownerNameList: [], ownerNameResult: {} };
79
+ }
80
+ var list = Array.from(new Set(sealList.map(function (item) { return item.ownerName; })));
81
+ var result = {};
82
+ list.forEach(function (ownerName) {
83
+ result[ownerName] = sealList.filter(function (item) { return item.ownerName === ownerName; });
84
+ });
85
+ return { ownerNameList: list, ownerNameResult: result };
86
+ }, [sealList]), ownerNameList = _d.ownerNameList, ownerNameResult = _d.ownerNameResult;
87
+ // 新版:当前选中的公司(默认第一个)
88
+ var _e = useState(ownerList[0]), selectedOwner = _e[0], setSelectedOwner = _e[1];
89
+ useEffect(function () {
90
+ // 公司列表变化时,重置选中公司为第一个
91
+ if (ownerList.length > 0 && !ownerList.includes(selectedOwner)) {
92
+ setSelectedOwner(ownerList[0]);
93
+ }
94
+ }, [ownerList, selectedOwner]);
95
+ // 新版:当前选中公司下的印章列表
96
+ var currentSeals = ownerMap[selectedOwner] || [];
97
+ // 新版:sealId → 公司简称 映射,用于统计每个公司选中了几个印章
98
+ var sealIdToOwner = useMemo(function () {
99
+ var map = {};
100
+ Object.keys(ownerMap).forEach(function (owner) {
101
+ ownerMap[owner].forEach(function (item) {
102
+ map[item.sealId] = owner;
103
+ });
104
+ });
105
+ return map;
106
+ }, [ownerMap]);
107
+ // 新版:每个公司下选中的印章数量
108
+ var ownerSelectedCount = useMemo(function () {
109
+ var countMap = {};
110
+ if (Array.isArray(value)) {
111
+ value.forEach(function (sealId) {
112
+ var owner = sealIdToOwner[sealId];
113
+ if (owner) {
114
+ countMap[owner] = (countMap[owner] || 0) + 1;
115
+ }
116
+ });
117
+ }
118
+ return countMap;
119
+ }, [value, sealIdToOwner]);
120
+ // 新版:已选印章完整信息列表
121
+ var selectedSealList = useMemo(function () {
122
+ if (!Array.isArray(value) || !Array.isArray(sealList)) {
123
+ return [];
124
+ }
125
+ return value
126
+ .map(function (id) { return sealList.find(function (item) { return item.sealId === id; }); })
127
+ .filter(Boolean);
128
+ }, [value, sealList]);
129
+ // ========= 旧版渲染(手风琴模式) =========
130
+ if (!isNewElectronSealStyle) {
131
+ return ownerNameList.length === 0 ? null : (React.createElement(Checkbox.Group, __assign({ value: value, onChange: function (e) {
132
+ onChange && onChange(e);
133
+ }, disabled: !isEdit, className: "electron-seal-list--wrap" }, resetProp),
134
+ React.createElement(Collapse, { defaultActiveKey: ownerNameList.map(function (item, index) { return index; }), style: { width: '100%' } }, ownerNameList.map(function (ownerName, index) {
135
+ var _a;
136
+ return (React.createElement(Collapse.Panel, { key: index, header: React.createElement("div", { className: "electron-seal-list--owner-name" }, ownerName) }, (_a = ownerNameResult[ownerName]) === null || _a === void 0 ? void 0 : _a.map(function (item) {
137
+ return (React.createElement(Checkbox, { key: item.sealId, value: item.sealId }, item.sealName));
138
+ })));
139
+ }))));
140
+ }
141
+ // ========= 新版渲染(三段式布局) =========
142
+ if (ownerList.length === 0) {
143
+ return null;
144
+ }
145
+ return (React.createElement("div", __assign({ className: "electron-seal-list-new--wrap" }, resetProp),
146
+ React.createElement("div", { className: "seal-owner-tabs" }, ownerList.map(function (owner) {
147
+ var _a, _b;
148
+ var count = ownerSelectedCount[owner] || 0;
149
+ return (React.createElement("div", __assign({ key: owner, className: "seal-owner-tab " + (selectedOwner === owner ? 'seal-owner-tab--active' : ''), title: ((_b = (_a = ownerMap[owner]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.ownerName) || owner }, (electronSealTabTrigger === 'hover'
150
+ ? { onMouseEnter: function () { return setSelectedOwner(owner); } }
151
+ : { onClick: function () { return setSelectedOwner(owner); } })),
152
+ React.createElement("span", { className: "seal-owner-tab--name" }, owner),
153
+ count > 0 && (React.createElement("span", { className: "seal-owner-tab--count" }, count))));
154
+ })),
155
+ React.createElement("div", { className: "seal-list-current" }, currentSeals.map(function (item) {
156
+ var checked = Array.isArray(value) && value.includes(item.sealId);
157
+ return (React.createElement(Checkbox, { key: item.sealId, checked: checked, disabled: !isEdit, onChange: function () {
158
+ var newValue = checked
159
+ ? (value || []).filter(function (id) { return id !== item.sealId; })
160
+ : __spreadArray(__spreadArray([], (value || [])), [item.sealId]);
161
+ onChange && onChange(newValue);
162
+ } },
163
+ React.createElement("span", { title: item.sealName }, getSealShortName(item))));
164
+ })),
165
+ React.createElement("div", { className: "seal-selected-summary" },
166
+ React.createElement("div", { className: "seal-selected-title" }, "\u5DF2\u9009\u5370\u7AE0"),
167
+ selectedSealList.length > 0 ? (selectedSealList.map(function (item) { return (React.createElement("div", { key: item.sealId, className: "seal-selected-item", title: ((item.ownerName || '') + " " + (item.sealName || '')).trim() },
168
+ getOwnerShortName(item),
169
+ " ",
170
+ getSealShortName(item))); })) : (React.createElement("div", { className: "seal-selected-empty" }, "\u6682\u672A\u9009\u62E9\u5370\u7AE0")))));
60
171
  };
61
172
  export default memo(ElectronSealList);
@@ -3,6 +3,10 @@ import { IElectronSignaturesProps } from './interface';
3
3
  interface IElectronSignaturesContext {
4
4
  isQjVerifyCode?: boolean;
5
5
  isNewQys?: boolean;
6
+ /** 电子印章是否使用新版展示样式 */
7
+ isNewElectronSealStyle?: boolean;
8
+ /** 群杰印章是否使用新版展示样式 */
9
+ isNewQunjSealStyle?: boolean;
6
10
  }
7
11
  export declare const ElectronSignaturesContext: React.Context<IElectronSignaturesContext>;
8
12
  declare const _default: React.NamedExoticComponent<IElectronSignaturesProps>;
@@ -22,20 +22,33 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React, { memo, useMemo, createContext } from 'react';
24
24
  import ElectronSignatures from './content';
25
+ import useBaseContext from '../utils/useBaseContext';
25
26
  export var ElectronSignaturesContext = createContext({
26
27
  isNewQys: true,
27
28
  isQjVerifyCode: true,
29
+ isNewElectronSealStyle: false,
30
+ isNewQunjSealStyle: false,
28
31
  });
29
32
  /**
30
33
  * 容器组件,为了将context传递给组件,方便组件能快速访问到一些信息
31
34
  */
32
35
  var ElectronSignaturesWrap = function (props) {
36
+ var _a, _b, _c, _d;
33
37
  // 这里未上线之前,都使用默认为false。不采用最新版本的修改
34
- var _a = props.isQjVerifyCode, isQjVerifyCode = _a === void 0 ? false : _a, _b = props.isNewQys, isNewQys = _b === void 0 ? false : _b, resetProps = __rest(props, ["isQjVerifyCode", "isNewQys"]);
38
+ var _e = props.isQjVerifyCode, isQjVerifyCode = _e === void 0 ? false : _e, _f = props.isNewQys, isNewQys = _f === void 0 ? false : _f, resetProps = __rest(props, ["isQjVerifyCode", "isNewQys"]);
39
+ // 全局配置:组件 props 优先,未传时取全局 ZtxkContext 配置
40
+ var _g = useBaseContext(), globalElectronSealStyle = _g.isNewElectronSealStyle, globalQunjSealStyle = _g.isNewQunjSealStyle;
41
+ var isNewElectronSealStyle = (_b = (_a = props.isNewElectronSealStyle) !== null && _a !== void 0 ? _a : globalElectronSealStyle) !== null && _b !== void 0 ? _b : false;
42
+ var isNewQunjSealStyle = (_d = (_c = props.isNewQunjSealStyle) !== null && _c !== void 0 ? _c : globalQunjSealStyle) !== null && _d !== void 0 ? _d : false;
35
43
  var defaultContext = useMemo(function () {
36
- return { isNewQys: isNewQys, isQjVerifyCode: isQjVerifyCode };
37
- }, [isNewQys, isQjVerifyCode]);
44
+ return {
45
+ isNewQys: isNewQys,
46
+ isQjVerifyCode: isQjVerifyCode,
47
+ isNewElectronSealStyle: isNewElectronSealStyle,
48
+ isNewQunjSealStyle: isNewQunjSealStyle,
49
+ };
50
+ }, [isNewQys, isQjVerifyCode, isNewElectronSealStyle, isNewQunjSealStyle]);
38
51
  return (React.createElement(ElectronSignaturesContext.Provider, { value: defaultContext },
39
- React.createElement(ElectronSignatures, __assign({ isQjVerifyCode: isQjVerifyCode, isNewQys: isNewQys }, resetProps))));
52
+ React.createElement(ElectronSignatures, __assign({ isQjVerifyCode: isQjVerifyCode, isNewQys: isNewQys, isNewElectronSealStyle: isNewElectronSealStyle, isNewQunjSealStyle: isNewQunjSealStyle }, resetProps))));
40
53
  };
41
54
  export default memo(ElectronSignaturesWrap);
@@ -445,6 +445,16 @@ export interface IElectronSignaturesItemPublic {
445
445
  * 是否应用 最新的契约锁组件样式
446
446
  */
447
447
  isNewQys?: boolean;
448
+ /**
449
+ * 是否使用新版电子印章展示样式(公司简称分组 + 三段式布局)
450
+ * 未传时取全局 ZtxkContext 中的 isNewElectronSealStyle
451
+ */
452
+ isNewElectronSealStyle?: boolean;
453
+ /**
454
+ * 是否使用新版群杰印章展示样式(公司分组 + 三段式布局)
455
+ * 未传时取全局 ZtxkContext 中的 isNewQunjSealStyle
456
+ */
457
+ isNewQunjSealStyle?: boolean;
448
458
  /**
449
459
  * 户用合同章显示的逻辑的控制
450
460
  */
@@ -25,6 +25,10 @@ interface IProps {
25
25
  qjVerifyCodeData?: IQjVerifyCode[];
26
26
  getQjVerifyCodeHandle?: (params: any) => Promise<any>;
27
27
  flowStatus?: ITrackItem['flowStatus'];
28
+ /** 是否显示用印增加申请 */
29
+ isShowSealApply?: boolean;
30
+ /** 前往流程中心用印申请 */
31
+ goWorkflowSeal?: (wfProcessInstId: string) => void;
28
32
  }
29
33
  declare const _default: React.NamedExoticComponent<IProps>;
30
34
  export default _default;
@@ -43,12 +43,20 @@ import { getToken } from 'ztxkutils/dist/authority';
43
43
  import { ElectronSignaturesContext } from '..';
44
44
  import { comparePermission } from '../hooks/useGetQjVerifyCode';
45
45
  import dayjs from 'dayjs';
46
+ /** 获取公司名称(fallback companyType) */
47
+ function getCompanyName(item) {
48
+ return (item === null || item === void 0 ? void 0 : item.companyTypeName) || (item === null || item === void 0 ? void 0 : item.companyType) || '';
49
+ }
50
+ /** 获取印章简称(fallback sealName) */
51
+ function getSealShortName(item) {
52
+ return (item === null || item === void 0 ? void 0 : item.sealShortName) || (item === null || item === void 0 ? void 0 : item.sealName) || '';
53
+ }
46
54
  /**
47
55
  * 群杰详情列表
48
56
  */
49
57
  var QunjDetail = function (_a) {
50
58
  var _b;
51
- var qunjList = _a.qunjList, qunjSeal = _a.qunjSeal, isContranctNum = _a.isContranctNum, isQunjAddress = _a.isQunjAddress, currentQunjAddress = _a.currentQunjAddress, refreshCode = _a.refreshCode, request = _a.request, isEdit = _a.isEdit, apiBaseUrl = _a.apiBaseUrl, caseId = _a.caseId, wfProcessInstId = _a.wfProcessInstId, verifyUserIds = _a.verifyUserIds, qjVerifyCodeData = _a.qjVerifyCodeData, getQjVerifyCodeHandle = _a.getQjVerifyCodeHandle, flowStatus = _a.flowStatus;
59
+ var qunjList = _a.qunjList, qunjSeal = _a.qunjSeal, isContranctNum = _a.isContranctNum, isQunjAddress = _a.isQunjAddress, currentQunjAddress = _a.currentQunjAddress, refreshCode = _a.refreshCode, request = _a.request, isEdit = _a.isEdit, apiBaseUrl = _a.apiBaseUrl, caseId = _a.caseId, wfProcessInstId = _a.wfProcessInstId, verifyUserIds = _a.verifyUserIds, qjVerifyCodeData = _a.qjVerifyCodeData, getQjVerifyCodeHandle = _a.getQjVerifyCodeHandle, flowStatus = _a.flowStatus, isShowSealApply = _a.isShowSealApply, goWorkflowSeal = _a.goWorkflowSeal;
52
60
  // 新版本的群杰验证码是通过接口获取的
53
61
  var _c = useState(), vertifyCode = _c[0], setVerifyCode = _c[1];
54
62
  var _d = useState(false), isError = _d[0], setIsError = _d[1]; // 接口调用是否报错
@@ -59,7 +67,7 @@ var QunjDetail = function (_a) {
59
67
  var code = useMemo(function () {
60
68
  return padWithZeroes((qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.code) || (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode), 6);
61
69
  }, [qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.code, qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode]);
62
- var isNewQys = useContext(ElectronSignaturesContext).isNewQys;
70
+ var _g = useContext(ElectronSignaturesContext), isNewQys = _g.isNewQys, isNewQunjSealStyle = _g.isNewQunjSealStyle;
63
71
  /**
64
72
  * 更新当前组件状态
65
73
  */
@@ -192,17 +200,27 @@ var QunjDetail = function (_a) {
192
200
  if (refreshCode) {
193
201
  (_a = codeModalRef.current) === null || _a === void 0 ? void 0 : _a.open({ formNo: wfProcessInstId });
194
202
  }
195
- } }, i18next.t('刷新验证码')))),
203
+ } }, i18next.t('刷新验证码'))),
204
+ isShowSealApply && goWorkflowSeal && wfProcessInstId ? (React.createElement(Button, { style: { marginLeft: 'auto' }, type: "link", onClick: function () { return goWorkflowSeal(wfProcessInstId); } }, i18next.t('用印增加申请'))) : null),
196
205
  (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.code) || (qunjSeal === null || qunjSeal === void 0 ? void 0 : qunjSeal.vertifyCode) ? (React.createElement("div", null,
197
206
  React.createElement(Button, { type: "link", onClick: function () {
198
207
  querySealStatus();
199
208
  } }, i18next.t('查询用印状态')))) : null)),
200
209
  React.createElement("div", { className: "qunj-detail--info" },
201
- isContranctNum && (React.createElement("div", null,
202
- i18next.t('盖章文件数量:'),
203
- React.createElement("span", null, qunjSeal === null || qunjSeal === void 0 ? void 0 :
204
- qunjSeal.contranctNum,
205
- i18next.t('份')))),
210
+ React.createElement("div", { style: {
211
+ display: 'flex',
212
+ alignItems: 'center',
213
+ justifyContent: 'space-between',
214
+ } },
215
+ isContranctNum && (React.createElement("div", null,
216
+ i18next.t('盖章文件数量:'),
217
+ React.createElement("span", null, qunjSeal === null || qunjSeal === void 0 ? void 0 :
218
+ qunjSeal.contranctNum,
219
+ i18next.t('份')))),
220
+ isNewQunjSealStyle && wfProcessInstId ? (React.createElement("div", null,
221
+ "\u6D41\u7A0Bid:",
222
+ ' ',
223
+ React.createElement("span", { style: { fontSize: '15px' } }, wfProcessInstId))) : null),
206
224
  React.createElement("div", { className: "qunj-detail--address" },
207
225
  React.createElement("div", { className: "qunj-detail--type" },
208
226
  i18next.t('用印类型:'),
@@ -218,7 +236,9 @@ var QunjDetail = function (_a) {
218
236
  var _a;
219
237
  var item = (_a = qunjList === null || qunjList === void 0 ? void 0 : qunjList.find) === null || _a === void 0 ? void 0 : _a.call(qunjList, function (qunj) { return (qunj === null || qunj === void 0 ? void 0 : qunj.sealNo) === (detail === null || detail === void 0 ? void 0 : detail.sealNo); });
220
238
  return (React.createElement("div", { className: "qunj-detail--item", key: detail === null || detail === void 0 ? void 0 : detail.sealNo },
221
- React.createElement("div", null, item === null || item === void 0 ? void 0 : item.sealName),
239
+ React.createElement("div", null, isNewQunjSealStyle
240
+ ? getCompanyName(item || detail) + " " + getSealShortName(item || detail)
241
+ : item === null || item === void 0 ? void 0 : item.sealName),
222
242
  React.createElement("div", null,
223
243
  i18next.t('用印'),
224
244
  React.createElement("span", null, detail === null || detail === void 0 ? void 0 : detail.sealCount),