ztxkui 10.0.80 → 10.0.81

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.
@@ -32,6 +32,9 @@ interface IProps {
32
32
  /** 不需要显示附件类型 */
33
33
  isNotFileType?: boolean;
34
34
  openContractTemplateModalHandle?: any;
35
+ refreshCode?: boolean;
36
+ otherColumns?: any[];
37
+ organizationId?: string;
35
38
  }
36
39
  declare const _default: React.NamedExoticComponent<IProps>;
37
40
  export default _default;
@@ -27,7 +27,7 @@ import CompareResult from './CompareResult';
27
27
  import { fileBatchDownload, preCanDownload, nextDownload, sealFileBatchDownload, } from '../../../Upload/utils';
28
28
  var DetailTable = function (_a) {
29
29
  var _b;
30
- var needQj = _a.needQj, needQys = _a.needQys, records = _a.records, qunjSeal = _a.qunjSeal, electronicSeal = _a.electronicSealIdList, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, viewSealPageFn = _a.viewSealPageFn, contractId = _a.contractId, electronicList = _a.electronicList, sealList = _a.sealList, querySealStatus = _a.querySealStatus, showContranctNum = _a.showContranctNum, request = _a.request, needSaveTemplate = _a.needSaveTemplate, batchDownloadZipName = _a.batchDownloadZipName, docAttachMap = _a.docAttachMap, isNotFileType = _a.isNotFileType, openContractTemplateModalHandle = _a.openContractTemplateModalHandle;
30
+ var needQj = _a.needQj, needQys = _a.needQys, records = _a.records, qunjSeal = _a.qunjSeal, electronicSeal = _a.electronicSealIdList, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, viewSealPageFn = _a.viewSealPageFn, contractId = _a.contractId, electronicList = _a.electronicList, sealList = _a.sealList, querySealStatus = _a.querySealStatus, showContranctNum = _a.showContranctNum, request = _a.request, needSaveTemplate = _a.needSaveTemplate, batchDownloadZipName = _a.batchDownloadZipName, docAttachMap = _a.docAttachMap, isNotFileType = _a.isNotFileType, openContractTemplateModalHandle = _a.openContractTemplateModalHandle, refreshCode = _a.refreshCode, _c = _a.otherColumns, otherColumns = _c === void 0 ? [] : _c, organizationId = _a.organizationId;
31
31
  var authToken = token || '';
32
32
  var isOnlyQj = "" + ((_b = records === null || records === void 0 ? void 0 : records[0]) === null || _b === void 0 ? void 0 : _b.attachId) === '123456789';
33
33
  var selectRows = useRef(null);
@@ -35,7 +35,7 @@ var DetailTable = function (_a) {
35
35
  var downFileFn = function (_record) {
36
36
  try {
37
37
  var xhr_1 = new XMLHttpRequest();
38
- xhr_1.open('GET', ZT_API_BASEURL + "/api/zmdms-scm-system/seal/download-watermark-attach/" + (_record === null || _record === void 0 ? void 0 : _record.attachId) + "?Zmdms-Auth=bearer " + token, true);
38
+ xhr_1.open('GET', ZT_API_BASEURL + "/api/zmdms-scm-system/seal/download-watermark-attach/" + (_record === null || _record === void 0 ? void 0 : _record.attachId) + "?watermarkOrganizationType=12&watermarkOrganizationId=" + organizationId + "&Zmdms-Auth=bearer " + token, true);
39
39
  xhr_1.responseType = 'blob';
40
40
  xhr_1.onload = function () {
41
41
  var _a;
@@ -14,3 +14,6 @@ export declare function useElectronicData(data: any): {
14
14
  electronicSeal: any;
15
15
  setElectronicSeal: import("react").Dispatch<any>;
16
16
  };
17
+ export declare function useCheckedSealInfoList(request: any): {
18
+ getDeptInfo: any;
19
+ };
@@ -1,4 +1,8 @@
1
1
  import { useState, useEffect } from 'react';
2
+ /**
3
+ * 验证契约锁是否全部盖章
4
+ */
5
+ import useMemoizedFn from '../../utils/useMemoizedFn';
2
6
  /**
3
7
  * 外部数据发生改变,设置内部数据
4
8
  */
@@ -54,3 +58,33 @@ export function useElectronicData(data) {
54
58
  setElectronicSeal: setElectronicSeal,
55
59
  };
56
60
  }
61
+ export function useCheckedSealInfoList(request) {
62
+ var getDeptInfo = useMemoizedFn(function (params) {
63
+ return new Promise(function (resolve, reject) {
64
+ request({
65
+ url: '/api/zmdms-system/dept/detail',
66
+ params: params,
67
+ method: 'GET',
68
+ })
69
+ .then(function (res) {
70
+ var _a;
71
+ 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) {
72
+ var result = res.data.data;
73
+ resolve(result || {});
74
+ }
75
+ else {
76
+ // message.error(res.data.msg || '获取部门信息失败!');
77
+ reject(res.data.msg || '获取部门信息失败!');
78
+ }
79
+ })
80
+ .catch(function (error) {
81
+ var _a, _b;
82
+ // message.error(error?.response?.data?.msg || '获取部门信息失败!');
83
+ reject(((_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) || '获取部门信息失败!');
84
+ });
85
+ });
86
+ });
87
+ return {
88
+ getDeptInfo: getDeptInfo,
89
+ };
90
+ }
@@ -80,7 +80,7 @@ import CompareResult from './components/CompareResult';
80
80
  import QunjSeal from './components/QunjSeal';
81
81
  import ElectronicSeal from './components/ElectronicSeal';
82
82
  import DetailTable from './components/DetailTable';
83
- import { useRecords, useQunjData, useElectronicData } from './hooks';
83
+ import { useRecords, useQunjData, useElectronicData, useCheckedSealInfoList, } from './hooks';
84
84
  /** 需要存样板合同类型 采购合同 销售合同 双边合同 */
85
85
  var NEED_SAVE_TEMPLATE = [
86
86
  'scm_order_contract_cght',
@@ -213,6 +213,23 @@ var Sinatures = function (_a) {
213
213
  records,
214
214
  isCheckedEconomic,
215
215
  ]);
216
+ var _1 = useState(''), organizationId = _1[0], setOrganizationId = _1[1];
217
+ var getDeptInfo = useCheckedSealInfoList(request).getDeptInfo;
218
+ /**
219
+ * 通过部门Id获得公司id
220
+ */
221
+ useEffect(function () {
222
+ var _deptId = deptId;
223
+ if (_deptId) {
224
+ // 调用接口
225
+ getDeptInfo({
226
+ id: _deptId,
227
+ }).then(function (res) {
228
+ setOrganizationId((res === null || res === void 0 ? void 0 : res.companyId) || '');
229
+ });
230
+ }
231
+ // eslint-disable-next-line react-hooks/exhaustive-deps
232
+ }, [deptId]);
216
233
  /** 是否加盖群杰印章 */
217
234
  var needQjSealFn = function (e) {
218
235
  var _value = __assign(__assign({ isTakeOut: 0 }, (showContranctNum ? { contranctNum: 1 } : {})), { details: [] });
@@ -831,7 +848,7 @@ var Sinatures = function (_a) {
831
848
  });
832
849
  }
833
850
  // 上传组件的数据
834
- var _1 = useState(), originFileList = _1[0], setOriginFileList = _1[1];
851
+ var _2 = useState(), originFileList = _2[0], setOriginFileList = _2[1];
835
852
  /** 签章组件onChange事件 */
836
853
  var sigValuesChange = useCallback(function (type, value) {
837
854
  var _a, _b;
@@ -1139,7 +1156,7 @@ var Sinatures = function (_a) {
1139
1156
  docAttachMap: attachMap,
1140
1157
  };
1141
1158
  return (React.createElement(React.Fragment, null,
1142
- isEdit ? (React.createElement(Table, { columns: columnsLast, rowKey: "attachId", loading: tbloading, dataSource: records, scroll: { x: 'max-content', y: 400 } })) : (React.createElement(DetailTable, __assign({ isNotFileType: isNotFileType }, detail, { batchDownloadZipName: batchDownloadZipName, openContractTemplateModalHandle: openContractTemplateModalHandle }))),
1159
+ isEdit ? (React.createElement(Table, { columns: columnsLast, rowKey: "attachId", loading: tbloading, dataSource: records, scroll: { x: 'max-content', y: 400 } })) : (React.createElement(DetailTable, __assign({ isNotFileType: isNotFileType }, detail, { batchDownloadZipName: batchDownloadZipName, openContractTemplateModalHandle: openContractTemplateModalHandle, organizationId: organizationId }))),
1143
1160
  React.createElement(Modal, { title: "\u4E0B\u5217\u5370\u7AE0\u672A\u786E\u8BA4\u76D6\u7AE0\u4F4D\u7F6E\uFF0C\u5982\u4E0D\u9700\u8981\u8BF7\u53D6\u6D88\u52FE\u9009\u3002", width: 800, closable: false, visible: visible, loading: false, onCancel: function () {
1144
1161
  setVisible(false);
1145
1162
  }, footer: React.createElement(React.Fragment, null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "10.0.80",
3
+ "version": "10.0.81",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",