ztxkui 10.0.94 → 10.0.95

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.
@@ -85,19 +85,20 @@ var EXPORT_PDF_PAGEFORMATL = [841.89, 595.28]; // [595.28, 641.89]
85
85
  var PrintContainer = function (_a) {
86
86
  var children = _a.children, waterText = _a.waterText, onFonsizeChange = _a.onFonsizeChange, hiddenClassName = _a.hiddenClassName, _b = _a.isAddExportPage, isAddExportPage = _b === void 0 ? false : _b, _c = _a.loading, loading = _c === void 0 ? false : _c, _d = _a.pdfName, pdfName = _d === void 0 ? 'pdf文件' : _d, request = _a.request, sealIdList = _a.sealIdList, _e = _a.showHandSeal, showHandSeal = _e === void 0 ? true : _e, _f = _a.showAutoSeal, showAutoSeal = _f === void 0 ? true : _f, _g = _a.needWatermark, needWatermark = _g === void 0 ? 0 : _g, fileId = _a.fileId, deptId = _a.deptId, flowId = _a.flowId, imgWaterBg = _a.imgWaterBg, onPrintCallback = _a.onPrintCallback, showPrintMessage = _a.showPrintMessage, onPrintBeforeCallback = _a.onPrintBeforeCallback, _h = _a.showPrintBtn, showPrintBtn = _h === void 0 ? true : _h, _j = _a.showPluginPrintBtn, showPluginPrintBtn = _j === void 0 ? true : _j, isUseXy = _a.isUseXy, localKey = _a.localKey, _k = _a.showExportBtn, showExportBtn = _k === void 0 ? true : _k, showSetFontBtn = _a.showSetFontBtn, isSetPosition = _a.isSetPosition, // 默认不需要偏移
87
87
  showAddSeal = _a.showAddSeal, apiUrl = _a.apiUrl, defaultAddWater = _a.defaultAddWater, fileBaseUrl = _a.fileBaseUrl, ecPrintFn = _a.ecPrintFn, ecPrintCreatePdfHandleAfter = _a.ecPrintCreatePdfHandleAfter, clickCreatePdfHandlePre = _a.clickCreatePdfHandlePre, clickCreatePdfHandleNext = _a.clickCreatePdfHandleNext, handleRef = _a.handleRef, showAboutExport = _a.showAboutExport, isAboutExportSeal = _a.isAboutExportSeal, onAboutExportBeforeCallback = _a.onAboutExportBeforeCallback, showAboutExportMessage = _a.showAboutExportMessage, onAboutExportCallback = _a.onAboutExportCallback, aboutExportZipName = _a.aboutExportZipName, aboutExportAddWater = _a.aboutExportAddWater, buttonRender = _a.buttonRender, isPhone = _a.isPhone, showWaterBtn = _a.showWaterBtn, isNeedSeal = _a.isNeedSeal;
88
- var printContainer = React.useContext(ZtxkContext).printContainer;
88
+ var _l = React.useContext(ZtxkContext), printContainer = _l.printContainer, serviceNames = _l.serviceNames;
89
+ var _m = (serviceNames || {}).scmServiceName, scmServiceName = _m === void 0 ? '/zmdms-scm-system' : _m;
89
90
  if (!(printContainer === null || printContainer === void 0 ? void 0 : printContainer.print)) {
90
91
  showHandSeal = false;
91
92
  showAutoSeal = false;
92
93
  }
93
- var _l = useState(false), showWater = _l[0], setShowWater = _l[1];
94
+ var _o = useState(false), showWater = _o[0], setShowWater = _o[1];
94
95
  var containerRef = useRef();
95
96
  var allDomRef = useRef();
96
- var _m = useState(false), spinning = _m[0], setSpinning = _m[1];
97
+ var _p = useState(false), spinning = _p[0], setSpinning = _p[1];
97
98
  // 确认盖章后,会得到一个合同id 这个之后盖章要用
98
- var _o = useState(), currentContractId = _o[0], setCurrentContractId = _o[1];
99
+ var _q = useState(), currentContractId = _q[0], setCurrentContractId = _q[1];
99
100
  // 盖章后会得到一个预览地址,这个地址耀保存,同一个合同id,不能重复盖章接口
100
- var _p = useState(), currentViewUrl = _p[0], setCurrentViewUrl = _p[1];
101
+ var _r = useState(), currentViewUrl = _r[0], setCurrentViewUrl = _r[1];
101
102
  var onMouseDown = useMoveImg(containerRef).onMouseDown;
102
103
  useEffect(function () {
103
104
  try {
@@ -112,12 +113,12 @@ var PrintContainer = function (_a) {
112
113
  console.log(err);
113
114
  }
114
115
  }, [isPhone]);
115
- var _q = useGetSealList(request, { deptId: deptId, flowId: flowId },
116
+ var _s = useGetSealList(request, { deptId: deptId, flowId: flowId },
116
117
  // 这里是否发请求获取印章列表信息逻辑做下改动。
117
118
  // 之前只要有自动盖章按钮、手动盖章按钮的时候才发送请求获取印章信息
118
119
  // 这里多添加一个条件 如果添加盖章按钮时,也获取印章信息
119
- { sealIdList: sealIdList, isFetch: showAutoSeal || showHandSeal || isNeedSeal }), loadSealPromise = _q.loadSealPromise, _sealIdList = _q._sealIdList, autoSealList = _q.autoSealList, sealFileIdList = _q.sealFileIdList, isAutoSeal = _q.isAutoSeal;
120
- var _r = useAddSealImg(loadSealPromise, sealFileIdList, apiUrl, onMouseDown), showSeal = _r.showSeal, onAddSeal = _r.onAddSeal, removeSealHandle = _r.removeSealHandle;
120
+ { sealIdList: sealIdList, isFetch: showAutoSeal || showHandSeal || isNeedSeal }), loadSealPromise = _s.loadSealPromise, _sealIdList = _s._sealIdList, autoSealList = _s.autoSealList, sealFileIdList = _s.sealFileIdList, isAutoSeal = _s.isAutoSeal;
121
+ var _t = useAddSealImg(loadSealPromise, sealFileIdList, apiUrl, onMouseDown), showSeal = _t.showSeal, onAddSeal = _t.onAddSeal, removeSealHandle = _t.removeSealHandle;
121
122
  var fontLoadHandle = useFont(showHandSeal || showAutoSeal || showAboutExport).fontLoadHandle;
122
123
  // 关联导出
123
124
  var onAboutExportHandle = useAboutExport(isAutoSeal, {
@@ -209,6 +210,7 @@ var PrintContainer = function (_a) {
209
210
  errorCallback: function () {
210
211
  setSpinning(false);
211
212
  },
213
+ scmServiceName: scmServiceName,
212
214
  });
213
215
  }
214
216
  else {
@@ -267,11 +269,11 @@ var PrintContainer = function (_a) {
267
269
  });
268
270
  }); };
269
271
  // 边距调整相关
270
- var _s = useState(false), visible = _s[0], setVisible = _s[1];
271
- var _t = useState({
272
+ var _u = useState(false), visible = _u[0], setVisible = _u[1];
273
+ var _v = useState({
272
274
  top: 0,
273
275
  left: 0,
274
- }), value = _t[0], setValue = _t[1];
276
+ }), value = _v[0], setValue = _v[1];
275
277
  useNeedLodop();
276
278
  useInitSetPostion();
277
279
  var initDomPosition = useCallback(function () {
@@ -825,7 +827,7 @@ var PrintContainer = function (_a) {
825
827
  formData.append('deptId', deptId);
826
828
  }
827
829
  request({
828
- url: '/api/zmdms-scm-system/seal/confirm-seal-position',
830
+ url: "/api" + scmServiceName + "/seal/confirm-seal-position",
829
831
  method: 'POST',
830
832
  data: formData,
831
833
  timeout: 300000,
@@ -872,7 +874,7 @@ var PrintContainer = function (_a) {
872
874
  }
873
875
  setSpinning(true);
874
876
  request({
875
- url: '/api/zmdms-scm-system/seal/final-seal',
877
+ url: "/api" + scmServiceName + "/seal/final-seal",
876
878
  method: 'POST',
877
879
  data: {
878
880
  contractId: currentContractId,
@@ -969,7 +971,7 @@ var PrintContainer = function (_a) {
969
971
  });
970
972
  }
971
973
  request({
972
- url: '/api/zmdms-scm-system/seal/auto-seal',
974
+ url: "/api" + scmServiceName + "/seal/auto-seal",
973
975
  method: 'POST',
974
976
  data: formData,
975
977
  headers: {
@@ -1208,6 +1210,7 @@ var PrintContainer = function (_a) {
1208
1210
  newStatusArr[i] = 'rejected';
1209
1211
  resultHandle(i);
1210
1212
  },
1213
+ scmServiceName: scmServiceName,
1211
1214
  });
1212
1215
  });
1213
1216
  }
@@ -1250,6 +1253,7 @@ var PrintContainer = function (_a) {
1250
1253
  isPhone: isPhone,
1251
1254
  fileName: pdfName,
1252
1255
  apiUrl: apiUrl,
1256
+ scmServiceName: scmServiceName,
1253
1257
  });
1254
1258
  }
1255
1259
  else {
@@ -1290,6 +1294,7 @@ var PrintContainer = function (_a) {
1290
1294
  errorCallback: function () {
1291
1295
  setSpinning(false);
1292
1296
  },
1297
+ scmServiceName: scmServiceName,
1293
1298
  });
1294
1299
  }
1295
1300
  else {
@@ -14,20 +14,22 @@ import { useState, useEffect, useRef, useMemo } from 'react';
14
14
  import { createDownloadUrl } from 'ztxkutils/dist/fileOperation';
15
15
  import { getCurrentPosition } from './hooks';
16
16
  import { message } from '../../index';
17
+ import useServiceName from '../../hooks/useServiceName';
17
18
  // 获取印章id方法
18
19
  export function useGetSealList(request, params, otherOptions) {
19
20
  var deptId = params.deptId, flowId = params.flowId;
20
21
  var sealIdList = otherOptions.sealIdList, isFetch = otherOptions.isFetch;
22
+ var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
21
23
  // 接口请求ref
22
24
  var loadSealPromise = useRef(null);
23
25
  // 收到盖章-印章列表
24
- var _a = useState(), _sealIdList = _a[0], setSealIdList = _a[1];
26
+ var _b = useState(), _sealIdList = _b[0], setSealIdList = _b[1];
25
27
  // 自动盖章-印章列表
26
- var _b = useState(), autoSealList = _b[0], setAutoSealList = _b[1];
28
+ var _c = useState(), autoSealList = _c[0], setAutoSealList = _c[1];
27
29
  // 印章id
28
- var _c = useState(), sealFileIdList = _c[0], setSealFileIdList = _c[1];
30
+ var _d = useState(), sealFileIdList = _d[0], setSealFileIdList = _d[1];
29
31
  // 是否拥有印章
30
- var _d = useState(false), hasSeal = _d[0], setHasSeal = _d[1];
32
+ var _e = useState(false), hasSeal = _e[0], setHasSeal = _e[1];
31
33
  // 根据传入参数设置印章 关键字
32
34
  useEffect(function () {
33
35
  if (sealIdList) {
@@ -38,7 +40,7 @@ export function useGetSealList(request, params, otherOptions) {
38
40
  useEffect(function () {
39
41
  if (deptId && flowId && request && isFetch) {
40
42
  loadSealPromise.current = request({
41
- url: '/api/zmdms-scm-system/flowdeptseal/select-seal-info-list',
43
+ url: "/api" + scmServiceName + "/flowdeptseal/select-seal-info-list",
42
44
  method: 'GET',
43
45
  params: {
44
46
  size: 200,
@@ -80,7 +82,7 @@ export function useGetSealList(request, params, otherOptions) {
80
82
  message.error(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '获取印章失败!');
81
83
  });
82
84
  }
83
- }, [request, deptId, flowId, isFetch]);
85
+ }, [request, deptId, flowId, isFetch, scmServiceName]);
84
86
  // 是否能自动盖章
85
87
  var isAutoSeal = useMemo(function () {
86
88
  // 如果没有传入 流程id 那么说明也不需要盖章
@@ -11,6 +11,7 @@ export declare function autoSealThenDownloadFilesHandle(request: any, formData:
11
11
  isPhone?: boolean;
12
12
  fileName?: string;
13
13
  apiUrl?: string;
14
+ scmServiceName?: string;
14
15
  }): any;
15
16
  /**
16
17
  * 自动盖章下载盖章件
@@ -57,9 +57,9 @@ function createDownloadUrl(apiUrl, fileId, otherOptions) {
57
57
  * @params formData: any 请求参数
58
58
  */
59
59
  export function autoSealThenDownloadFilesHandle(request, formData, options) {
60
- var sucessCallback = options.sucessCallback, errorCallback = options.errorCallback, loadingCallback = options.loadingCallback, isPhone = options.isPhone, _a = options.apiUrl, apiUrl = _a === void 0 ? window.location.origin : _a, kkFileName = options.fileName;
60
+ var sucessCallback = options.sucessCallback, errorCallback = options.errorCallback, loadingCallback = options.loadingCallback, isPhone = options.isPhone, _a = options.apiUrl, apiUrl = _a === void 0 ? window.location.origin : _a, kkFileName = options.fileName, _b = options.scmServiceName, scmServiceName = _b === void 0 ? '/zmdms-scm-system' : _b;
61
61
  return request({
62
- url: '/api/zmdms-scm-system/seal/auto-seal-then-download-files',
62
+ url: "/api" + scmServiceName + "/seal/auto-seal-then-download-files",
63
63
  method: 'POST',
64
64
  data: formData,
65
65
  headers: {
@@ -24,7 +24,7 @@ export interface IResultType {
24
24
  otherParams: IParams;
25
25
  }
26
26
  export declare function fileBatchDownload(fileList: IFileItem[], otherConfig: IConfig): IResultType;
27
- export declare function sealFileBatchDownload(request: any, params: any, isCompress?: boolean): Partial<IResultType>;
27
+ export declare function sealFileBatchDownload(request: any, params: any, isCompress?: boolean, scmServiceName?: string): Partial<IResultType>;
28
28
  /**
29
29
  * 是否可以下载
30
30
  */
@@ -37,5 +37,5 @@ interface IOtherOption {
37
37
  /**
38
38
  * 批量下载
39
39
  */
40
- export declare function sealDownloadFileCallBack(request: any, params: any, otherOption?: IOtherOption): void;
40
+ export declare function sealDownloadFileCallBack(request: any, params: any, otherOption?: IOtherOption, scmServiceName?: string): void;
41
41
  export {};
@@ -105,8 +105,9 @@ export function fileBatchDownload(fileList, otherConfig) {
105
105
  otherParams: otherParams,
106
106
  };
107
107
  }
108
- export function sealFileBatchDownload(request, params, isCompress) {
108
+ export function sealFileBatchDownload(request, params, isCompress, scmServiceName) {
109
109
  if (isCompress === void 0) { isCompress = true; }
110
+ if (scmServiceName === void 0) { scmServiceName = '/zmdms-scm-system'; }
110
111
  var otherParams = {
111
112
  status: 'pending',
112
113
  };
@@ -121,7 +122,7 @@ export function sealFileBatchDownload(request, params, isCompress) {
121
122
  callbackError: function () {
122
123
  otherParams.status = 'rejected';
123
124
  },
124
- });
125
+ }, scmServiceName);
125
126
  }
126
127
  else {
127
128
  // 单个文件下载
@@ -147,7 +148,7 @@ export function sealFileBatchDownload(request, params, isCompress) {
147
148
  otherParams.otherList[index] = 'rejected';
148
149
  }
149
150
  },
150
- });
151
+ }, scmServiceName);
151
152
  });
152
153
  }
153
154
  }
@@ -208,11 +209,12 @@ export function nextDownload(donwloadReuslt, callback) {
208
209
  /**
209
210
  * 批量下载
210
211
  */
211
- export function sealDownloadFileCallBack(request, params, otherOption) {
212
+ export function sealDownloadFileCallBack(request, params, otherOption, scmServiceName) {
213
+ if (scmServiceName === void 0) { scmServiceName = '/zmdms-scm-system'; }
212
214
  var _a = otherOption || {}, callbackAfter = _a.callbackAfter, callbackError = _a.callbackError;
213
215
  request({
214
216
  method: 'POST',
215
- url: '/api/zmdms-scm-system/seal/batch-download-seal-files',
217
+ url: "/api" + scmServiceName + "/seal/batch-download-seal-files",
216
218
  responseType: 'blob',
217
219
  data: params,
218
220
  })
@@ -6,10 +6,12 @@ import React, { useState } from 'react';
6
6
  // redux
7
7
  // ztxkui公共组件
8
8
  import { Button, message } from '../../../../index';
9
+ import useServiceName from '../../../../hooks/useServiceName';
9
10
  var CompareResult = function (_a) {
10
11
  var record = _a.record, index = _a.index, request = _a.request;
11
12
  // 设置查看比对结果按钮的loading状态
12
13
  var _b = useState(false), resultLoading = _b[0], setResultLoading = _b[1];
14
+ var _c = (useServiceName() || {}).scmServiceName, scmServiceName = _c === void 0 ? '/zmdms-scm-system' : _c;
13
15
  var viewCompareResult = function () {
14
16
  console.log('查看比对结果', index, record);
15
17
  setResultLoading(true);
@@ -18,7 +20,7 @@ var CompareResult = function (_a) {
18
20
  if (task_id) {
19
21
  // 比对任务状态查询
20
22
  request({
21
- url: "/api/zmdms-scm-system/seal/query-compare-task/" + task_id,
23
+ url: "/api" + scmServiceName + "/seal/query-compare-task/" + task_id,
22
24
  method: 'GET',
23
25
  })
24
26
  .then(function (res) {
@@ -33,12 +33,13 @@ var DetailTable = function (_a) {
33
33
  var authToken = token || '';
34
34
  var isOnlyQj = "" + ((_b = records === null || records === void 0 ? void 0 : records[0]) === null || _b === void 0 ? void 0 : _b.attachId) === '123456789';
35
35
  var selectRows = useRef(null);
36
- var downWaterConfig = React.useContext(ZtxkContext).downWaterConfig;
36
+ var _d = React.useContext(ZtxkContext), downWaterConfig = _d.downWaterConfig, serviceNames = _d.serviceNames;
37
+ var _e = (serviceNames || {}).scmServiceName, scmServiceName = _e === void 0 ? '/zmdms-scm-system' : _e;
37
38
  /** 下载水印附件 */
38
39
  var downFileFn = function (_record) {
39
40
  try {
40
41
  var xhr_1 = new XMLHttpRequest();
41
- var apiUrl = "/zmdms-scm-system/seal/download-watermark-attach/" + (_record === null || _record === void 0 ? void 0 : _record.attachId) + "?Zmdms-Auth=bearer " + token;
42
+ var apiUrl = scmServiceName + "/seal/download-watermark-attach/" + (_record === null || _record === void 0 ? void 0 : _record.attachId) + "?Zmdms-Auth=bearer " + token;
42
43
  if (downWaterConfig === null || downWaterConfig === void 0 ? void 0 : downWaterConfig.api) {
43
44
  apiUrl = (downWaterConfig === null || downWaterConfig === void 0 ? void 0 : downWaterConfig.api) + "/" + (_record === null || _record === void 0 ? void 0 : _record.attachId) + "?Zmdms-Auth=bearer " + token + "&addWaterMark=true&watermarkOrganizationType=12&watermarkOrganizationId=" + organizationId;
44
45
  }
@@ -355,7 +356,7 @@ var DetailTable = function (_a) {
355
356
  })) {
356
357
  return;
357
358
  }
358
- sealBatchDownloadRef.current = sealFileBatchDownload(request, params);
359
+ sealBatchDownloadRef.current = sealFileBatchDownload(request, params, true, scmServiceName);
359
360
  }
360
361
  else {
361
362
  // 根据相关信息生成下载的链接
@@ -364,7 +365,7 @@ var DetailTable = function (_a) {
364
365
  })) {
365
366
  return;
366
367
  }
367
- sealNoCompressBatchDownloadRef.current = sealFileBatchDownload(request, params, false);
368
+ sealNoCompressBatchDownloadRef.current = sealFileBatchDownload(request, params, false, scmServiceName);
368
369
  }
369
370
  // request({
370
371
  // method: 'POST',
@@ -81,6 +81,7 @@ import QunjSeal from './components/QunjSeal';
81
81
  import ElectronicSeal from './components/ElectronicSeal';
82
82
  import DetailTable from './components/DetailTable';
83
83
  import { useRecords, useQunjData, useElectronicData, useCheckedSealInfoList, } from './hooks';
84
+ import useServiceName from '../../../hooks/useServiceName';
84
85
  /** 需要存样板合同类型 采购合同 销售合同 双边合同 */
85
86
  var NEED_SAVE_TEMPLATE = [
86
87
  'scm_order_contract_cght',
@@ -109,62 +110,63 @@ var Sinatures = function (_a) {
109
110
  _c = otherParams.fmsIsElectronicSealLabel, // 不需要显示附件类型
110
111
  fmsIsElectronicSealLabel = _c === void 0 ? '产业链综合服务平台-客户电子签章' : _c;
111
112
  var authToken = token || '';
113
+ var _d = (useServiceName() || {}).scmServiceName, scmServiceName = _d === void 0 ? '/zmdms-scm-system' : _d;
112
114
  // 是否可编辑 1可编辑 0不可编辑
113
115
  var isEdit = canEdit === 1;
114
116
  // 如果上传,需要传入系统的code
115
117
  var uploadData = useMemo(function () { return (systemCode ? { system: systemCode } : {}); }, [systemCode]);
116
118
  // 组件内部管理的数组
117
- var _d = useRecords(fileList), records = _d.records, setRecords = _d.setRecords;
119
+ var _e = useRecords(fileList), records = _e.records, setRecords = _e.setRecords;
118
120
  // 组件内部管理的群杰数据
119
- var _e = useQunjData(qunjSeal), innerQunjSeal = _e.qunjSeal, setQunjSeal = _e.setQunjSeal;
121
+ var _f = useQunjData(qunjSeal), innerQunjSeal = _f.qunjSeal, setQunjSeal = _f.setQunjSeal;
120
122
  // 组件内部管理的电子印章数据
121
- var _f = useElectronicData(electronicSeal), innerElectronicSeal = _f.electronicSeal, setElectronicSeal = _f.setElectronicSeal;
123
+ var _g = useElectronicData(electronicSeal), innerElectronicSeal = _g.electronicSeal, setElectronicSeal = _g.setElectronicSeal;
122
124
  // 设置确认盖章按钮是否展示
123
- var _g = useState(false), checkSealVisible = _g[0], setCheckSealVisible = _g[1];
125
+ var _h = useState(false), checkSealVisible = _h[0], setCheckSealVisible = _h[1];
124
126
  // 合同id
125
- var _h = useState(null), contractId = _h[0], setContractId = _h[1];
127
+ var _j = useState(null), contractId = _j[0], setContractId = _j[1];
126
128
  // 已盖章附件id
127
- var _j = useState([]), sealedIds = _j[0], setSealedIds = _j[1];
129
+ var _k = useState([]), sealedIds = _k[0], setSealedIds = _k[1];
128
130
  // docAttachMap
129
- var _k = useState(null), attachMap = _k[0], setAttachMap = _k[1];
131
+ var _l = useState(null), attachMap = _l[0], setAttachMap = _l[1];
130
132
  // 文档id列表
131
- var _l = useState([]), documentIds = _l[0], setDocumentIds = _l[1];
133
+ var _m = useState([]), documentIds = _m[0], setDocumentIds = _m[1];
132
134
  // 总用印次数超过4倍
133
- var _m = useState(false), isTotalSealNumTooMore = _m[0], setIsTotalSealNumTooMore = _m[1];
135
+ var _o = useState(false), isTotalSealNumTooMore = _o[0], setIsTotalSealNumTooMore = _o[1];
134
136
  // 采购合同 销售合同 双边合同 部门间交易合同 需要展示合同份数 其他的不需要
135
137
  var showContranctNum = FLOW_IDS.includes("" + flowId);
136
138
  // 电子印章列表
137
- var _o = useState([]), electronicList = _o[0], setElectronicList = _o[1];
139
+ var _p = useState([]), electronicList = _p[0], setElectronicList = _p[1];
138
140
  // 群杰印章列表
139
- var _p = useState([]), sealList = _p[0], setSealList = _p[1];
141
+ var _q = useState([]), sealList = _q[0], setSealList = _q[1];
140
142
  // 上一次盖章时的参数信息
141
- var _q = useState({}), prevParam = _q[0], setPrevParam = _q[1];
143
+ var _r = useState({}), prevParam = _r[0], setPrevParam = _r[1];
142
144
  // 请确认
143
- var _r = useState(false), isSure = _r[0], setIsSure = _r[1];
145
+ var _s = useState(false), isSure = _s[0], setIsSure = _s[1];
144
146
  // 群杰表单
145
147
  var form = Form.useForm()[0];
146
148
  // 是否加盖群杰印章
147
- var _s = useState(true), checked = _s[0], setChecked = _s[1];
149
+ var _t = useState(true), checked = _t[0], setChecked = _t[1];
148
150
  // 盖章按钮loading
149
- var _t = useState(false), loading = _t[0], setLoading = _t[1];
151
+ var _u = useState(false), loading = _u[0], setLoading = _u[1];
150
152
  // 初始化是否清空契约锁信息标识
151
- var _u = useState(true), isInit = _u[0], setIsInit = _u[1];
153
+ var _v = useState(true), isInit = _v[0], setIsInit = _v[1];
152
154
  // 表格loading
153
155
  var tbloading = useState(false)[0];
154
156
  // 仅需要群杰印章
155
- var _v = useState(false), isOnlyQj = _v[0], setIsOnlyQj = _v[1];
157
+ var _w = useState(false), isOnlyQj = _w[0], setIsOnlyQj = _w[1];
156
158
  // 存放onSigValuesChange缓存回调方法
157
159
  var fnRef = useRef();
158
160
  // 是否加盖经济责任人手签章
159
- var _w = useState(isCheckedEconomic ? true : false), isEconomic = _w[0], setIsEconomic = _w[1];
161
+ var _x = useState(isCheckedEconomic ? true : false), isEconomic = _x[0], setIsEconomic = _x[1];
160
162
  // 一级责任人名字
161
- var _x = useState(''), yjzrr = _x[0], setYjzrr = _x[1];
163
+ var _y = useState(''), yjzrr = _y[0], setYjzrr = _y[1];
162
164
  // 未确认盖章位置的弹窗是否可见
163
- var _y = useState(false), visible = _y[0], setVisible = _y[1];
165
+ var _z = useState(false), visible = _z[0], setVisible = _z[1];
164
166
  // 未确认盖章位置的电子印章列表
165
- var _z = useState([]), unSealList = _z[0], setUnSealList = _z[1];
167
+ var _0 = useState([]), unSealList = _0[0], setUnSealList = _0[1];
166
168
  // 需重新确认盖章位置的电子印章
167
- var _0 = useState([]), needReSealList = _0[0], setNeedReSealList = _0[1];
169
+ var _1 = useState([]), needReSealList = _1[0], setNeedReSealList = _1[1];
168
170
  useEffect(function () {
169
171
  setChecked(cancelDefaultCheckedQj ? false : true);
170
172
  }, [cancelDefaultCheckedQj]);
@@ -213,7 +215,7 @@ var Sinatures = function (_a) {
213
215
  records,
214
216
  isCheckedEconomic,
215
217
  ]);
216
- var _1 = useState(''), organizationId = _1[0], setOrganizationId = _1[1];
218
+ var _2 = useState(''), organizationId = _2[0], setOrganizationId = _2[1];
217
219
  var getDeptInfo = useCheckedSealInfoList(request).getDeptInfo;
218
220
  /**
219
221
  * 通过部门Id获得公司id
@@ -265,7 +267,7 @@ var Sinatures = function (_a) {
265
267
  params.flowId = flowId;
266
268
  }
267
269
  request({
268
- url: '/api/zmdms-scm-system/flowdeptseal/select-seal-info-list',
270
+ url: "/api" + scmServiceName + "/flowdeptseal/select-seal-info-list",
269
271
  params: params,
270
272
  method: 'GET',
271
273
  })
@@ -303,11 +305,11 @@ var Sinatures = function (_a) {
303
305
  var _a, _b;
304
306
  message.error(((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '请求失败!');
305
307
  });
306
- }, [deptId, flowId, request]);
308
+ }, [deptId, flowId, request, scmServiceName]);
307
309
  /** 获取一级责任人名字 */
308
310
  var getYjzrrName = useCallback(function () {
309
311
  request({
310
- url: "/api/zmdms-scm-system/seal/get-yjzrr-name/" + deptId,
312
+ url: "/api" + scmServiceName + "/seal/get-yjzrr-name/" + deptId,
311
313
  method: 'GET',
312
314
  })
313
315
  .then(function (res) {
@@ -322,7 +324,7 @@ var Sinatures = function (_a) {
322
324
  .catch(function (error) {
323
325
  //
324
326
  });
325
- }, [deptId, request]);
327
+ }, [deptId, request, scmServiceName]);
326
328
  /** 获取群杰印章列表 */
327
329
  var getQunjSealList = useCallback(function () {
328
330
  request({
@@ -419,7 +421,7 @@ var Sinatures = function (_a) {
419
421
  // 上一次盖章时的参数信息
420
422
  setPrevParam(params);
421
423
  request({
422
- url: '/api/zmdms-scm-system/seal/confirm-seal-info',
424
+ url: "/api" + scmServiceName + "/seal/confirm-seal-info",
423
425
  method: 'POST',
424
426
  timeout: 5 * 60 * 1000,
425
427
  data: params,
@@ -464,7 +466,7 @@ var Sinatures = function (_a) {
464
466
  var getNoSealInfoList = function () {
465
467
  return new Promise(function (resolve, reject) {
466
468
  request({
467
- url: '/api/zmdms-scm-system/seal/query-unconfirmed-position-seal-list',
469
+ url: "/api" + scmServiceName + "/seal/query-unconfirmed-position-seal-list",
468
470
  data: {
469
471
  contractId: contractId,
470
472
  sealIdList: innerElectronicSeal,
@@ -499,7 +501,7 @@ var Sinatures = function (_a) {
499
501
  var viewSealPageFn = function () {
500
502
  if (contractId) {
501
503
  request({
502
- url: '/api/zmdms-scm-system/seal/view-seal-state',
504
+ url: "/api" + scmServiceName + "/seal/view-seal-state",
503
505
  data: { contractId: contractId, canEdit: canEdit, flowStatus: flowStatus },
504
506
  method: 'POST',
505
507
  })
@@ -848,7 +850,7 @@ var Sinatures = function (_a) {
848
850
  });
849
851
  }
850
852
  // 上传组件的数据
851
- var _2 = useState(), originFileList = _2[0], setOriginFileList = _2[1];
853
+ var _3 = useState(), originFileList = _3[0], setOriginFileList = _3[1];
852
854
  /** 签章组件onChange事件 */
853
855
  var sigValuesChange = useCallback(function (type, value) {
854
856
  var _a, _b;
@@ -9,6 +9,8 @@ export interface IZtxkConfig {
9
9
  hightKeywords?: boolean;
10
10
  serviceNames: {
11
11
  mdmServiceName: string;
12
+ /** SCM 印章/盖章相关服务名,用于替换 /zmdms-scm-system 前缀 */
13
+ scmServiceName?: string;
12
14
  };
13
15
  precisions: {
14
16
  price: number;
@@ -8,6 +8,7 @@ var ztxkConfig = {
8
8
  hightKeywords: false,
9
9
  serviceNames: {
10
10
  mdmServiceName: '/zmdms-mdm-data',
11
+ scmServiceName: '/zmdms-scm-system',
11
12
  },
12
13
  precisions: {
13
14
  price: 2,
@@ -1,4 +1,5 @@
1
1
  declare function useServiceName(): {
2
2
  mdmServiceName: string;
3
+ scmServiceName?: string;
3
4
  };
4
5
  export default useServiceName;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "10.0.94",
3
+ "version": "10.0.95",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",