ztxkui 3.2.5 → 3.2.6

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.
@@ -5,9 +5,6 @@
5
5
  import React from 'react';
6
6
  interface IProps {
7
7
  record: any;
8
- ZT_API_BASEURL: string;
9
- ZT_FILE_BASEURL: string;
10
- token: string;
11
8
  index: number;
12
9
  request?: any;
13
10
  }
@@ -6,27 +6,28 @@ import React, { useState } from 'react';
6
6
  // redux
7
7
  // ztxkui公共组件
8
8
  import { Button, message } from '../../../../index';
9
- import { previewFile } from '../utils';
10
9
  var CompareResult = function (_a) {
11
- var record = _a.record, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, index = _a.index, request = _a.request;
10
+ var record = _a.record, index = _a.index, request = _a.request;
12
11
  // 设置查看比对结果按钮的loading状态
13
12
  var _b = useState(false), loading = _b[0], setLoading = _b[1];
14
13
  var onClickHandle = function () {
15
14
  console.log('查看比对结果', index, record);
16
15
  setLoading(true);
17
16
  try {
18
- var task_id_1 = record.taskId;
19
- if (task_id_1) {
17
+ var task_id = record.taskId;
18
+ if (task_id) {
20
19
  // 比对任务状态查询
21
20
  request({
22
- url: "/api/zmdms-resource/seal/query-compare-task/" + task_id_1,
21
+ url: "/api/zmdms-resource/seal/query-compare-task/" + task_id,
23
22
  method: 'GET',
24
23
  })
25
24
  .then(function (res) {
26
- if (res.status === 200 && res.data.code === 200) {
27
- var url = ZT_API_BASEURL + "/zmdms-resource/seal/download-compare-file/" + task_id_1 + "?Zmdms-Auth=" + token + "&fullfilename=1.zip";
28
- // 比对文件下载
29
- previewFile(ZT_FILE_BASEURL, url);
25
+ var _a;
26
+ if (res.status === 200 &&
27
+ res.data.code === 200 &&
28
+ ((_a = res.data.data[0]) === null || _a === void 0 ? void 0 : _a.url)) {
29
+ // 比对文件预览
30
+ window.open(res.data.data[0].url);
30
31
  }
31
32
  else {
32
33
  message.error(res.data.msg || '出错了');
@@ -38,7 +39,7 @@ var CompareResult = function (_a) {
38
39
  });
39
40
  }
40
41
  else {
41
- message.info('缺少taskId');
42
+ message.info('请先进行合同比对!');
42
43
  }
43
44
  }
44
45
  catch (err) {
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
2
  interface IProps {
3
3
  record: any;
4
- ZT_API_BASEURL: string;
5
- ZT_FILE_BASEURL: string;
6
- token: string;
7
4
  index: number;
8
5
  /** 点击客户样板 */
9
6
  openCustomerModalHandle?: any;
@@ -8,7 +8,7 @@ import React, { useState } from 'react';
8
8
  // ztxkui公共组件
9
9
  import { Button } from '../../../../index';
10
10
  var TemplateAttach = function (_a) {
11
- var record = _a.record, ZT_API_BASEURL = _a.ZT_API_BASEURL, ZT_FILE_BASEURL = _a.ZT_FILE_BASEURL, token = _a.token, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index, request = _a.request, getTaskId = _a.getTaskId, isEdit = _a.isEdit;
11
+ var record = _a.record, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index, request = _a.request, getTaskId = _a.getTaskId, isEdit = _a.isEdit;
12
12
  // 设置合同比对按钮的loading状态
13
13
  var _b = useState(false), loading = _b[0], setLoading = _b[1];
14
14
  var onClickHandle = function () {
@@ -51,8 +51,10 @@ var TemplateAttach = function (_a) {
51
51
  }
52
52
  };
53
53
  return (React.createElement("div", null,
54
+ React.createElement("div", null, record.templateAttachName || ''),
55
+ React.createElement("div", null, record.templateCrNo || ''),
54
56
  React.createElement("div", null,
55
- React.createElement(Button, { type: "link", onClick: function () {
57
+ React.createElement(Button, { type: "link", disabled: !isEdit, onClick: function () {
56
58
  openCustomerModalHandle && openCustomerModalHandle(index);
57
59
  } }, "\u9009\u62E9\u5BA2\u6237\u6837\u677F")),
58
60
  React.createElement(Button, { type: "primary", size: "small", disabled: !isEdit, onClick: onClickHandle, loading: loading }, "\u5408\u540C\u6BD4\u5BF9")));
@@ -202,7 +202,7 @@ var Sinatures = function (_a) {
202
202
  dataIndex: 'templateAttachId',
203
203
  width: 220,
204
204
  render: function (text, record, index) {
205
- return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, request: request, ZT_API_BASEURL: ZT_API_BASEURL, ZT_FILE_BASEURL: ZT_FILE_BASEURL, token: authToken, index: index, openCustomerModalHandle: openCustomerModalHandle, getTaskId: getTaskId, isEdit: isEdit })) : ('');
205
+ return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, request: request, index: index, openCustomerModalHandle: openCustomerModalHandle, getTaskId: getTaskId, isEdit: isEdit })) : ('');
206
206
  },
207
207
  },
208
208
  {
@@ -211,7 +211,7 @@ var Sinatures = function (_a) {
211
211
  dataIndex: 'compareAttachId',
212
212
  width: 100,
213
213
  render: function (text, record, index) {
214
- return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, ZT_API_BASEURL: ZT_API_BASEURL, ZT_FILE_BASEURL: ZT_FILE_BASEURL, token: authToken, index: index, request: request })) : ('');
214
+ return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request })) : ('');
215
215
  },
216
216
  },
217
217
  {
@@ -13,6 +13,7 @@ export interface IFileItem {
13
13
  compareAttachSize?: string;
14
14
  isWatermark?: boolean;
15
15
  isElectronicSeal?: boolean;
16
+ templateCrNo?: string;
16
17
  [prop: string]: any;
17
18
  }
18
19
  export interface IQunjProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "3.2.5",
3
+ "version": "3.2.6",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",