kmkf-work-order-service-component 0.4.11 → 0.4.12

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.
@@ -7,9 +7,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
7
7
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
8
8
 
9
9
  import React from 'react';
10
- import { Divider, Modal } from 'antd';
10
+ import { Divider, Modal, Button, message } from 'antd';
11
11
  import moment from 'moment';
12
- import { useAppDispatch } from "../../../../../model/hooks";
12
+ import copy from 'copy-to-clipboard';
13
+ import { useAppSelector, useAppDispatch } from "../../../../../model/hooks";
13
14
  import { setPaymentWorkOrderExamineModalVisible, setCurrentPaymentRecord, setPaymentWorkOrderUnExamineModalVisible, setDeletePaymentWorkOrderVisible, setFlagPayModalVisible, setLogModalVisible, setPaymentFormModalVisible } from "../../../../../model/paymentWorkOrder";
14
15
  import { getAlipayBillReceipt } from "../../../../../model/servers/api";
15
16
  import "./index.less";
@@ -73,6 +74,9 @@ function PaymentWorkOrderCard(props) {
73
74
  var _props$record = props.record,
74
75
  record = _props$record === void 0 ? {} : _props$record;
75
76
  var dispatch = useAppDispatch();
77
+ var platformInfo = useAppSelector(function (state) {
78
+ return state.global.platformInfo;
79
+ });
76
80
  var workPayStatusDesc = record.workPayStatusDesc,
77
81
  workPayStatus = record.workPayStatus,
78
82
  operateTime = record.operateTime,
@@ -164,7 +168,7 @@ function PaymentWorkOrderCard(props) {
164
168
 
165
169
  var voucherHandle = /*#__PURE__*/function () {
166
170
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(record) {
167
- var params, res, data, message;
171
+ var params, res, data, msg;
168
172
  return _regeneratorRuntime().wrap(function _callee$(_context) {
169
173
  while (1) {
170
174
  switch (_context.prev = _context.next) {
@@ -178,19 +182,31 @@ function PaymentWorkOrderCard(props) {
178
182
 
179
183
  case 3:
180
184
  res = _context.sent;
181
- console.log(res);
182
- data = res.data, message = res.message;
185
+ data = res.data, msg = res.message;
183
186
 
184
187
  if (data) {
185
- window.open(data);
188
+ if (['fxg'].includes(platformInfo === null || platformInfo === void 0 ? void 0 : platformInfo.platform)) {
189
+ Modal.info({
190
+ title: '付款凭证',
191
+ content: /*#__PURE__*/React.createElement("div", null, "\u8BF7\u590D\u5236\u94FE\u63A5\u5728\u6D4F\u89C8\u5668\u4E0A\u6253\u5F00\uFF0C\u94FE\u63A5\uFF1A".concat(data), ' ', /*#__PURE__*/React.createElement(Button, {
192
+ type: "primary",
193
+ onClick: function onClick() {
194
+ copy(data);
195
+ message.success('复制成功');
196
+ }
197
+ }, "\u70B9\u51FB\u590D\u5236"))
198
+ });
199
+ } else {
200
+ window.open(data);
201
+ }
186
202
  } else {
187
203
  Modal.info({
188
204
  title: '付款凭证',
189
- content: message
205
+ content: msg
190
206
  });
191
207
  }
192
208
 
193
- case 7:
209
+ case 6:
194
210
  case "end":
195
211
  return _context.stop();
196
212
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",