kmkf-work-order-service-component 0.3.3-alpha.1 → 0.3.3

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,7 +32,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
32
32
 
33
33
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
34
34
 
35
- import React, { useState, useMemo, useCallback, useEffect, useRef } from 'react';
35
+ import React, { useState, useMemo, useCallback, useEffect } from 'react';
36
36
  import { useSelector, useDispatch } from 'react-redux';
37
37
  import { Drawer, Form, Spin, ConfigProvider, Button, message, Space } from 'antd';
38
38
  import { LeftOutlined } from '@ant-design/icons';
@@ -40,9 +40,9 @@ import { get, find, some, set, debounce } from 'lodash';
40
40
  import zhCN from 'antd/es/locale/zh_CN';
41
41
  import moment from 'moment';
42
42
  import 'moment/locale/zh-cn';
43
- import { calcWorkOrderList, submitDataTransOldFormat, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME } from "../../../../../common/utils/tools";
43
+ import { calcWorkOrderList, submitDataTransOldFormat, orderBack } from "../../../../../common/utils/tools";
44
44
  import { factory } from "../../../Widget";
45
- import { queryTemplateDetail, addWorkOrder, queryWorkOrderDetail, updateWorkOrder, replaceCheck } from "../../../../../model/servers/api";
45
+ import { queryTemplateDetail, addWorkOrder, queryWorkOrderDetail, updateWorkOrder } from "../../../../../model/servers/api";
46
46
  import { selectorFormModalVisible } from "../../../../../model/customizeWorkOrder/selector";
47
47
  import { setFormModalVisible } from "../../../../../model/customizeWorkOrder";
48
48
  import { selectorCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder/selector";
@@ -81,12 +81,6 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
81
81
  workOrderDetail = _useState6[0],
82
82
  setWorkOrderDetail = _useState6[1];
83
83
 
84
- var _useState7 = useState({}),
85
- _useState8 = _slicedToArray(_useState7, 2),
86
- replaceValue = _useState8[0],
87
- setReplaceValue = _useState8[1]; //字段重复校验
88
-
89
-
90
84
  var visible = useSelector(selectorFormModalVisible);
91
85
 
92
86
  var _Form$useForm = Form.useForm(),
@@ -94,7 +88,6 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
94
88
  form = _Form$useForm2[0];
95
89
 
96
90
  var dispatch = useDispatch();
97
- var time = useRef();
98
91
  useEffect(function () {
99
92
  if (visible) {
100
93
  queryDetail({
@@ -323,137 +316,9 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
323
316
  formItemIndex: formItemIndex
324
317
  });
325
318
  return instance.editRender({
326
- formItemIndex: formItemIndex,
327
- onBlur: componentOnBlur
319
+ formItemIndex: formItemIndex
328
320
  });
329
321
  };
330
- }; //组件失焦事件
331
-
332
-
333
- var componentOnBlur = /*#__PURE__*/function () {
334
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value, type) {
335
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
336
- while (1) {
337
- switch (_context2.prev = _context2.next) {
338
- case 0:
339
- if (value) {
340
- _context2.next = 3;
341
- break;
342
- }
343
-
344
- setReplaceValue(function (prev) {
345
- return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, type, 0));
346
- });
347
- return _context2.abrupt("return");
348
-
349
- case 3:
350
- queryReplaceCount(_defineProperty({}, type, value));
351
-
352
- if (type === 'tradeId' || type === 'enterprisePaymentTid') {
353
- changeHandle(value);
354
- }
355
-
356
- case 5:
357
- case "end":
358
- return _context2.stop();
359
- }
360
- }
361
- }, _callee2);
362
- }));
363
-
364
- return function componentOnBlur(_x3, _x4) {
365
- return _ref2.apply(this, arguments);
366
- };
367
- }(); //查询重复数量
368
-
369
-
370
- var queryReplaceCount = /*#__PURE__*/function () {
371
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(componentValue) {
372
- var needCheckComponentList, params, _yield$replaceCheck, resultList, resultParams;
373
-
374
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
375
- while (1) {
376
- switch (_context3.prev = _context3.next) {
377
- case 0:
378
- needCheckComponentList = getReplaceWarnValues(templateDetail, componentValue);
379
-
380
- if (!needCheckComponentList.length) {
381
- _context3.next = 9;
382
- break;
383
- }
384
-
385
- params = {
386
- templateId: templateDetail.uniqueKey,
387
- workOrderUniqueKey: workOrderDetail === null || workOrderDetail === void 0 ? void 0 : workOrderDetail.uniqueKey,
388
- needCheckComponentList: needCheckComponentList
389
- };
390
- _context3.next = 5;
391
- return replaceCheck(params);
392
-
393
- case 5:
394
- _yield$replaceCheck = _context3.sent;
395
- resultList = _yield$replaceCheck.data.resultList;
396
- resultParams = (resultList || []).reduce(function (prv, next) {
397
- var _next$componentKey$sp = next.componentKey.split('_'),
398
- _next$componentKey$sp2 = _slicedToArray(_next$componentKey$sp, 2),
399
- _ = _next$componentKey$sp2[0],
400
- name = _next$componentKey$sp2[1];
401
-
402
- prv[name] = next.repeatCount;
403
- return prv;
404
- }, {});
405
- setReplaceValue(function (prev) {
406
- return _objectSpread(_objectSpread({}, prev), resultParams);
407
- });
408
-
409
- case 9:
410
- case "end":
411
- return _context3.stop();
412
- }
413
- }
414
- }, _callee3);
415
- }));
416
-
417
- return function queryReplaceCount(_x5) {
418
- return _ref3.apply(this, arguments);
419
- };
420
- }(); //订单返填
421
-
422
-
423
- var changeHandle = function changeHandle(order_no) {
424
- if (!order_no) return;
425
-
426
- if (time.current) {
427
- clearTimeout(time.current);
428
- }
429
-
430
- time.current = setTimeout(function () {
431
- orderBack({
432
- order_no: order_no,
433
- form: form,
434
- shopId: currentShopId,
435
- shopList: shopList,
436
- templateDetail: templateDetail,
437
- type: !!workOrderId ? 'edit' : 'add',
438
- callback: orderBackReplace
439
- });
440
- }, 1000);
441
- }; //自动返填重复校验
442
-
443
-
444
- var orderBackReplace = function orderBackReplace(value) {
445
- var tradeId = value.tradeId,
446
- buyer = value.buyer,
447
- receiveMobile = value.receiveMobile,
448
- alipayAccount = value.alipayAccount,
449
- expressLogisticsCode = value.expressLogisticsCode;
450
- queryReplaceCount({
451
- tradeId: tradeId,
452
- buyerNick: buyer === null || buyer === void 0 ? void 0 : buyer.buyerNick,
453
- receiveMobile: receiveMobile,
454
- alipayAccount: alipayAccount,
455
- expressLogisticsCode: expressLogisticsCode
456
- });
457
322
  };
458
323
 
459
324
  var finalFormItems = useMemo(function () {
@@ -469,25 +334,25 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
469
334
  }, [templateDetail, shopList, currentShopId, workOrderDetail]);
470
335
 
471
336
  var queryDetail = /*#__PURE__*/function () {
472
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_ref4) {
337
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
473
338
  var templateId, workOrderId, shopId, shopList, record, orderNo, buyerId, buyerNick, _workOrderDetail2, _workOrderDetail2$dat, _workOrderDetail2$dat2, _workOrderDetail, _templateDetail, _workOrderDetail3, _templateDetail$data, transData, _templateDetail$data2, _templateDetail$data3, jsonMap, _transData, antFormEl;
474
339
 
475
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
340
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
476
341
  while (1) {
477
- switch (_context4.prev = _context4.next) {
342
+ switch (_context2.prev = _context2.next) {
478
343
  case 0:
479
- templateId = _ref4.templateId, workOrderId = _ref4.workOrderId, shopId = _ref4.shopId, shopList = _ref4.shopList, record = _ref4.record, orderNo = _ref4.orderNo, buyerId = _ref4.buyerId, buyerNick = _ref4.buyerNick;
344
+ templateId = _ref2.templateId, workOrderId = _ref2.workOrderId, shopId = _ref2.shopId, shopList = _ref2.shopList, record = _ref2.record, orderNo = _ref2.orderNo, buyerId = _ref2.buyerId, buyerNick = _ref2.buyerNick;
480
345
  form.resetFields();
481
- _context4.prev = 2;
346
+ _context2.prev = 2;
482
347
  setLoading(true);
483
348
  _workOrderDetail = {};
484
349
 
485
350
  if (!workOrderId) {
486
- _context4.next = 9;
351
+ _context2.next = 9;
487
352
  break;
488
353
  }
489
354
 
490
- _context4.next = 8;
355
+ _context2.next = 8;
491
356
  return queryWorkOrderDetail({
492
357
  checkIsAllowedExport: false,
493
358
  shopId: shopId,
@@ -495,16 +360,16 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
495
360
  });
496
361
 
497
362
  case 8:
498
- _workOrderDetail = _context4.sent;
363
+ _workOrderDetail = _context2.sent;
499
364
 
500
365
  case 9:
501
- _context4.next = 11;
366
+ _context2.next = 11;
502
367
  return queryTemplateDetail({
503
368
  uniqueKey: templateId || ((_workOrderDetail2 = _workOrderDetail) === null || _workOrderDetail2 === void 0 ? void 0 : (_workOrderDetail2$dat = _workOrderDetail2.data) === null || _workOrderDetail2$dat === void 0 ? void 0 : (_workOrderDetail2$dat2 = _workOrderDetail2$dat.jsonMap) === null || _workOrderDetail2$dat2 === void 0 ? void 0 : _workOrderDetail2$dat2.templateId)
504
369
  });
505
370
 
506
371
  case 11:
507
- _templateDetail = _context4.sent;
372
+ _templateDetail = _context2.sent;
508
373
  setTemplateDetail(_templateDetail.data);
509
374
  setWorkOrderDetail(_workOrderDetail.data);
510
375
 
@@ -547,36 +412,35 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
547
412
  form: form,
548
413
  shopId: shopId,
549
414
  shopList: shopList,
550
- templateDetail: _templateDetail === null || _templateDetail === void 0 ? void 0 : _templateDetail.data,
551
- callback: orderBackReplace
415
+ templateDetail: _templateDetail === null || _templateDetail === void 0 ? void 0 : _templateDetail.data
552
416
  });
553
417
  }
554
418
 
555
419
  antFormEl = document.getElementsByClassName('ant-form');
556
420
  (antFormEl === null || antFormEl === void 0 ? void 0 : antFormEl.length) > 0 && set(antFormEl, '0.scrollTop', 0);
557
- _context4.next = 23;
421
+ _context2.next = 23;
558
422
  break;
559
423
 
560
424
  case 20:
561
- _context4.prev = 20;
562
- _context4.t0 = _context4["catch"](2);
563
- console.error('获取模板信息错误', _context4.t0);
425
+ _context2.prev = 20;
426
+ _context2.t0 = _context2["catch"](2);
427
+ console.error('获取模板信息错误', _context2.t0);
564
428
 
565
429
  case 23:
566
- _context4.prev = 23;
430
+ _context2.prev = 23;
567
431
  setLoading(false);
568
- return _context4.finish(23);
432
+ return _context2.finish(23);
569
433
 
570
434
  case 26:
571
435
  case "end":
572
- return _context4.stop();
436
+ return _context2.stop();
573
437
  }
574
438
  }
575
- }, _callee4, null, [[2, 20, 23, 26]]);
439
+ }, _callee2, null, [[2, 20, 23, 26]]);
576
440
  }));
577
441
 
578
- return function queryDetail(_x6) {
579
- return _ref5.apply(this, arguments);
442
+ return function queryDetail(_x3) {
443
+ return _ref3.apply(this, arguments);
580
444
  };
581
445
  }();
582
446
 
@@ -632,16 +496,9 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
632
496
  destroyOnClose: true,
633
497
  children: /*#__PURE__*/_jsx(Spin, {
634
498
  spinning: loading,
635
- children: /*#__PURE__*/_jsxs(ConfigProvider, {
499
+ children: /*#__PURE__*/_jsx(ConfigProvider, {
636
500
  locale: zhCN,
637
- children: [/*#__PURE__*/_jsx("div", {
638
- className: "tipBox",
639
- children: Object.keys(replaceValue).map(function (key) {
640
- return replaceValue[key] > 0 && /*#__PURE__*/_jsxs("div", {
641
- children: ["\u63D0\u793A\uFF1A\u8BE5", COMPONENT_MAP_NAME[key], "\u9488\u5BF9\u6B64\u6A21\u677F\u5DF2\u521B\u5EFA\u8FC7", replaceValue[key], "\u6761\u5DE5\u5355\uFF01"]
642
- });
643
- })
644
- }), /*#__PURE__*/_jsx(Form, {
501
+ children: /*#__PURE__*/_jsx(Form, {
645
502
  form: form,
646
503
  labelCol: {
647
504
  span: 6
@@ -650,10 +507,11 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
650
507
  span: 18
651
508
  },
652
509
  className: "customizeFormModalClassName",
653
- style: {// maxHeight: '500px',
510
+ style: {
511
+ maxHeight: '500px'
654
512
  },
655
513
  children: finalFormItems
656
- })]
514
+ })
657
515
  })
658
516
  })
659
517
  });
@@ -124,11 +124,3 @@
124
124
  font-family: 'PingFangSC-Regular';
125
125
  }
126
126
  }
127
-
128
- .tipBox {
129
- position: sticky;
130
- top: -24px;
131
- z-index: 1;
132
- color: #e99d42;
133
- background-color: #fff;
134
- }
@@ -26,9 +26,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
26
  import React from 'react';
27
27
  import { Divider } from 'antd';
28
28
  import moment from 'moment';
29
+ import { isEmpty } from 'lodash';
29
30
  import { useAppDispatch } from "../../../../../model/hooks";
30
31
  import { factory } from "../../../Widget";
31
- import { calcWorkOrderList, isNull } from "../../../../../common/utils/tools";
32
+ import { calcWorkOrderList } from "../../../../../common/utils/tools";
32
33
  import { WORK_ORDER_STATUS, WAITING, HANDLING, STOPPING } from "../../../../../common/constant";
33
34
  import { setStatusSelectModalVisible, setLogModalVisible, setFormModalVisible, setTemplateId, setCustomizeFormShopId, setCurrentCustomizeRecord } from "../../../../../model/customizeWorkOrder";
34
35
  import "./index.less";
@@ -127,19 +128,19 @@ function CustomizeWorkOrderCard(props) {
127
128
  return transferOrder(item);
128
129
  },
129
130
  children: "\u8F6C\u4EA4"
130
- }), /*#__PURE__*/_jsx("span", {
131
- className: "orderItemOperate",
132
- onClick: function onClick() {
133
- return handleEdit(item);
134
- },
135
- children: "\u4FEE\u6539"
136
- }), /*#__PURE__*/_jsx("span", {
137
- className: "orderItemOperate",
138
- onClick: function onClick() {
139
- return deleteHandle(item);
140
- },
141
- children: "\u5220\u9664"
142
131
  })]
132
+ }), /*#__PURE__*/_jsx("span", {
133
+ className: "orderItemOperate",
134
+ onClick: function onClick() {
135
+ return handleEdit(item);
136
+ },
137
+ children: "\u4FEE\u6539"
138
+ }), /*#__PURE__*/_jsx("span", {
139
+ className: "orderItemOperate",
140
+ onClick: function onClick() {
141
+ return deleteHandle(item);
142
+ },
143
+ children: "\u5220\u9664"
143
144
  }), /*#__PURE__*/_jsx("span", {
144
145
  className: "orderItemOperate",
145
146
  onClick: function onClick() {
@@ -199,11 +200,11 @@ function CustomizeWorkOrderCard(props) {
199
200
  var subColumns = instance.getColumns(); // 复合组件存在多个字段展示
200
201
 
201
202
  return subColumns !== null && subColumns !== void 0 && subColumns.children ? subColumns.children.map(function (item) {
202
- return !isNull(transData[(item === null || item === void 0 ? void 0 : item.dataIndex) || '']) ? /*#__PURE__*/_jsx(ItemView, {
203
+ return !isEmpty(transData[(item === null || item === void 0 ? void 0 : item.dataIndex) || '']) ? /*#__PURE__*/_jsx(ItemView, {
203
204
  label: item.title,
204
205
  value: item.render(transData[(item === null || item === void 0 ? void 0 : item.dataIndex) || ''], transData)
205
206
  }, item.dataIndex) : null;
206
- }) : !isNull(transData[(subColumns === null || subColumns === void 0 ? void 0 : subColumns.dataIndex) || '']) ? /*#__PURE__*/_jsx(ItemView, {
207
+ }) : !isEmpty(transData[(subColumns === null || subColumns === void 0 ? void 0 : subColumns.dataIndex) || '']) ? /*#__PURE__*/_jsx(ItemView, {
207
208
  label: t.name,
208
209
  value: instance.render(transData[(subColumns === null || subColumns === void 0 ? void 0 : subColumns.dataIndex) || ''], transData)
209
210
  }, t.uniqueKey) : null;
@@ -36,7 +36,7 @@ import { LeftOutlined } from '@ant-design/icons';
36
36
  import { get, debounce } from 'lodash';
37
37
  import { useDispatch, useSelector } from 'react-redux';
38
38
  import { useAppSelector } from "../../../../../model/hooks";
39
- import { decodeAlipayInfo, editRemitOrder, addPaymentOrder, getThirdOpenUidByOrderNo, paymentReplaceCheck } from "../../../../../model/servers/api";
39
+ import { decodeAlipayInfo, editRemitOrder, addPaymentOrder, getThirdOpenUidByOrderNo } from "../../../../../model/servers/api";
40
40
  import { selectPaymentFormModalVisible, selectCurrentPaymentRecord } from "../../../../../model/paymentWorkOrder/selector";
41
41
  import { setPaymentFormModalVisible } from "../../../../../model/paymentWorkOrder";
42
42
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -60,12 +60,6 @@ function ModifyModal(props) {
60
60
  shopInfo = _useState4[0],
61
61
  setShopInfo = _useState4[1];
62
62
 
63
- var _useState5 = useState(0),
64
- _useState6 = _slicedToArray(_useState5, 2),
65
- count = _useState6[0],
66
- setCount = _useState6[1]; //重复数量
67
-
68
-
69
63
  var _Form$useForm = Form.useForm(),
70
64
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
71
65
  form = _Form$useForm2[0];
@@ -238,61 +232,18 @@ function ModifyModal(props) {
238
232
  getThirdUid(order_no, taobaoId);
239
233
  }, 1000);
240
234
  }
241
- };
242
-
243
- var TidBlurHandle = /*#__PURE__*/function () {
244
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(e) {
245
- var tid, _yield$paymentReplace, data;
246
-
247
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
248
- while (1) {
249
- switch (_context3.prev = _context3.next) {
250
- case 0:
251
- tid = e.target.value;
252
-
253
- if (tid) {
254
- _context3.next = 4;
255
- break;
256
- }
257
-
258
- setCount(0);
259
- return _context3.abrupt("return");
260
-
261
- case 4:
262
- _context3.next = 6;
263
- return paymentReplaceCheck({
264
- tid: tid,
265
- paymentOrderKey: record === null || record === void 0 ? void 0 : record.paymentOrderKey
266
- });
267
-
268
- case 6:
269
- _yield$paymentReplace = _context3.sent;
270
- data = _yield$paymentReplace.data;
271
- setCount(+data || 0);
272
-
273
- case 9:
274
- case "end":
275
- return _context3.stop();
276
- }
277
- }
278
- }, _callee3);
279
- }));
280
-
281
- return function TidBlurHandle(_x3) {
282
- return _ref3.apply(this, arguments);
283
- };
284
- }(); //获取买家信息
235
+ }; //获取买家信息
285
236
 
286
237
 
287
238
  var getThirdUid = /*#__PURE__*/function () {
288
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(order_no, taobaoId) {
239
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(order_no, taobaoId) {
289
240
  var buyer, buyerInfo;
290
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
241
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
291
242
  while (1) {
292
- switch (_context4.prev = _context4.next) {
243
+ switch (_context3.prev = _context3.next) {
293
244
  case 0:
294
- _context4.prev = 0;
295
- _context4.next = 3;
245
+ _context3.prev = 0;
246
+ _context3.next = 3;
296
247
  return getThirdOpenUidByOrderNo({
297
248
  orderNo: order_no,
298
249
  toAppKey: '21819818',
@@ -301,26 +252,26 @@ function ModifyModal(props) {
301
252
  });
302
253
 
303
254
  case 3:
304
- buyer = _context4.sent;
255
+ buyer = _context3.sent;
305
256
  buyerInfo = buyer === null || buyer === void 0 ? void 0 : buyer.data;
306
257
  form.setFieldsValue(_objectSpread({}, buyerInfo || {}));
307
- _context4.next = 10;
258
+ _context3.next = 10;
308
259
  break;
309
260
 
310
261
  case 8:
311
- _context4.prev = 8;
312
- _context4.t0 = _context4["catch"](0);
262
+ _context3.prev = 8;
263
+ _context3.t0 = _context3["catch"](0);
313
264
 
314
265
  case 10:
315
266
  case "end":
316
- return _context4.stop();
267
+ return _context3.stop();
317
268
  }
318
269
  }
319
- }, _callee4, null, [[0, 8]]);
270
+ }, _callee3, null, [[0, 8]]);
320
271
  }));
321
272
 
322
- return function getThirdUid(_x4, _x5) {
323
- return _ref4.apply(this, arguments);
273
+ return function getThirdUid(_x3, _x4) {
274
+ return _ref3.apply(this, arguments);
324
275
  };
325
276
  }();
326
277
 
@@ -347,9 +298,9 @@ function ModifyModal(props) {
347
298
  children: "\u786E\u5B9A"
348
299
  })]
349
300
  }),
350
- children: /*#__PURE__*/_jsxs(Spin, {
301
+ children: /*#__PURE__*/_jsx(Spin, {
351
302
  spinning: loading,
352
- children: [/*#__PURE__*/_jsxs(Form, {
303
+ children: /*#__PURE__*/_jsxs(Form, {
353
304
  form: form,
354
305
  labelCol: {
355
306
  span: 6
@@ -387,8 +338,7 @@ function ModifyModal(props) {
387
338
  message: '请输入正确的订单编号'
388
339
  }],
389
340
  children: /*#__PURE__*/_jsx(Input, {
390
- onChange: TidChangeHandle,
391
- onBlur: TidBlurHandle
341
+ onChange: TidChangeHandle
392
342
  })
393
343
  }), /*#__PURE__*/_jsx(Form.Item, {
394
344
  label: "\u652F\u4ED8\u5B9D\u59D3\u540D",
@@ -403,12 +353,7 @@ function ModifyModal(props) {
403
353
  }],
404
354
  children: /*#__PURE__*/_jsx(Input, {})
405
355
  })]
406
- }), count > 0 && /*#__PURE__*/_jsxs("div", {
407
- style: {
408
- color: '#e99d42'
409
- },
410
- children: ["\u63D0\u793A\uFF1A\u8BE5\u8BA2\u5355\u53F7\u9488\u5BF9\u6B64\u6A21\u677F\u5DF2\u521B\u5EFA\u8FC7", count, "\u6761\u5DE5\u5355\uFF01"]
411
- })]
356
+ })
412
357
  })
413
358
  });
414
359
  }
@@ -83,15 +83,12 @@ var EAlipay = /*#__PURE__*/function (_BasicComponent) {
83
83
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
84
84
  var _this$componentConfig, _this$componentConfig2;
85
85
 
86
- var onBlur = value.onBlur;
87
86
  return getFormItem(_objectSpread({
88
87
  title: _this.name,
89
88
  name: _this.id,
90
89
  rules: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? _this.customRules(_this.componentConfig) : [],
91
90
  required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
92
- component: /*#__PURE__*/_jsx(AliPay, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
93
- onBlur: onBlur
94
- }))
91
+ component: /*#__PURE__*/_jsx(AliPay, _objectSpread({}, _this.componentConfig))
95
92
  }, value));
96
93
  });
97
94
 
@@ -74,15 +74,12 @@ var EBuyerNick = /*#__PURE__*/function (_BasicComponent) {
74
74
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
75
75
  var _this$componentConfig, _this$componentConfig2;
76
76
 
77
- var onBlur = value.onBlur;
78
77
  return getFormItem(_objectSpread({
79
78
  title: _this.name,
80
79
  name: _this.id,
81
80
  rules: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? _this.customRules(_this.componentConfig) : [],
82
81
  required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
83
- component: /*#__PURE__*/_jsx(BuyerNick, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
84
- onBlur: onBlur
85
- }))
82
+ component: /*#__PURE__*/_jsx(BuyerNick, _objectSpread({}, _this.componentConfig))
86
83
  }, value));
87
84
  });
88
85
 
@@ -89,15 +89,12 @@ var ELogistics = /*#__PURE__*/function (_BasicComponent) {
89
89
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
90
90
  var _this$componentConfig, _this$componentConfig2;
91
91
 
92
- var onBlur = value.onBlur;
93
92
  return getFormItem(_objectSpread({
94
93
  title: _this.name,
95
94
  name: _this.id,
96
95
  rules: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.required ? _this.customRules(_this.componentConfig) : [],
97
96
  required: (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required,
98
- component: /*#__PURE__*/_jsx(ExpressLogistics, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
99
- onBlur: onBlur
100
- }))
97
+ component: /*#__PURE__*/_jsx(ExpressLogistics, _objectSpread({}, _this.componentConfig))
101
98
  }, value));
102
99
  });
103
100
 
@@ -14,6 +14,5 @@ declare class ReceiverMobile extends Input {
14
14
  }[];
15
15
  constructor(options: any);
16
16
  render: (value: any, record: any) => JSX.Element;
17
- editRender: (value: any) => JSX.Element;
18
17
  }
19
18
  export default ReceiverMobile;
@@ -1,9 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
 
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
-
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
-
7
3
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
4
 
9
5
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -38,8 +34,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
38
34
  */
39
35
  import React from 'react';
40
36
  import Input from "../../basic/Input";
41
- import { ApaasInput } from '@raycloud-apaas-fe-setup/apaas-react-basics-widgets';
42
- import { getFormItem } from "../../common/formItemWrap";
43
37
  import { jsx as _jsx } from "react/jsx-runtime";
44
38
 
45
39
  var ReceiverMobile = /*#__PURE__*/function (_Input) {
@@ -82,24 +76,6 @@ var ReceiverMobile = /*#__PURE__*/function (_Input) {
82
76
  });
83
77
  });
84
78
 
85
- _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
86
- var _this$componentConfig;
87
-
88
- var _onBlur = value.onBlur;
89
- return getFormItem(_objectSpread({
90
- title: _this.name,
91
- name: _this.id,
92
- rules: _this.rules,
93
- required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
94
- component: /*#__PURE__*/_jsx(ApaasInput, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
95
- placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
96
- onBlur: function onBlur(e) {
97
- _onBlur(e.target.value, 'receiveMobile');
98
- }
99
- }))
100
- }, value));
101
- });
102
-
103
79
  _this.dataType = 'string';
104
80
  _this.showContains = true;
105
81
  _this.effects = options.effects;
@@ -75,12 +75,6 @@ var ETradeId = /*#__PURE__*/function (_Input) {
75
75
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
76
76
  var _this$componentConfig;
77
77
 
78
- var onBlur = value.onBlur;
79
-
80
- var onTradeIdBlur = function onTradeIdBlur(e) {
81
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e.target.value, 'tradeId');
82
- };
83
-
84
78
  return getFormItem(_objectSpread({
85
79
  title: _this.name,
86
80
  name: _this.id,
@@ -88,7 +82,9 @@ var ETradeId = /*#__PURE__*/function (_Input) {
88
82
  required: (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.required,
89
83
  component: /*#__PURE__*/_jsx(TradeId, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
90
84
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
91
- onBlur: onTradeIdBlur
85
+ onChange: function onChange(e) {
86
+ return _this.changeHandle(e.target.value);
87
+ }
92
88
  }))
93
89
  }, value));
94
90
  });
@@ -120,7 +120,6 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
120
120
  _defineProperty(_assertThisInitialized(_this), "editRender", function (value) {
121
121
  var _this$componentConfig;
122
122
 
123
- var onBlur = value.onBlur;
124
123
  return getFormItem(_objectSpread({
125
124
  title: _this.name,
126
125
  name: _this.id,
@@ -129,8 +128,7 @@ var Payment = /*#__PURE__*/function (_BasicComponent) {
129
128
  component: /*#__PURE__*/_jsx(ApaasPayment, _objectSpread(_objectSpread({}, _this.componentConfig), {}, {
130
129
  onSearch: function onSearch(e) {
131
130
  return _this.changeHandle(e.target.value);
132
- },
133
- onBlur: onBlur
131
+ }
134
132
  }))
135
133
  }, value));
136
134
  });
@@ -60,16 +60,5 @@ export interface WorkOrderDetail {
60
60
  }
61
61
  export declare const formatPictures: (pictures: any) => any;
62
62
  export declare const calcWorkOrderList: (source: Partial<WorkOrderDetail>[], templateColumns: TemplateColumnConfig[], type?: string) => any[];
63
- export declare const orderBack: ({ order_no, form, shopId, shopList, templateDetail, type, callback, }: any) => Promise<void>;
63
+ export declare const orderBack: ({ order_no, form, shopId, shopList, templateDetail, type, }: any) => Promise<void>;
64
64
  export declare const imgResize: (url: string, w?: number, h?: number) => string;
65
- export declare const COMPONENT_MAP: {
66
- [key: string]: string;
67
- };
68
- export declare const COMPONENT_MAP_NAME: {
69
- [key: string]: string;
70
- };
71
- export declare const getReplaceWarnValues: (templateDetail: {
72
- componentDtoList: any[];
73
- }, keyValues: {
74
- [x: string]: any;
75
- }) => any;
@@ -634,13 +634,13 @@ export var orderBack = /*#__PURE__*/function () {
634
634
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
635
635
  var _shopList$find;
636
636
 
637
- var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, shopSourceStr, _shopList$find2, _data$value, _buyer$value, taobaoId, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, orderInfo, buyerInfo, _ref3, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, itemList, transField, finalResponse, formValue, detail, componentsParams, detailsValue, _templateDetail$compo, paymentUniqueKey;
637
+ var order_no, form, shopId, shopList, templateDetail, _ref$type, type, shopSourceStr, _shopList$find2, _data$value, _buyer$value, taobaoId, promise, _yield$Promise$allSet, _yield$Promise$allSet2, data, buyer, orderInfo, buyerInfo, _ref3, orderNo, provinceCode, cityCode, townCode, orderCreateDateTime, orderPaymentDateTime, orderDeliveryDateTime, orderClosingDateTime, itemList, transField, finalResponse, formValue, detail, componentsParams, detailsValue, _templateDetail$compo, paymentUniqueKey;
638
638
 
639
639
  return _regeneratorRuntime().wrap(function _callee$(_context) {
640
640
  while (1) {
641
641
  switch (_context.prev = _context.next) {
642
642
  case 0:
643
- order_no = _ref.order_no, form = _ref.form, shopId = _ref.shopId, shopList = _ref.shopList, templateDetail = _ref.templateDetail, _ref$type = _ref.type, type = _ref$type === void 0 ? 'add' : _ref$type, callback = _ref.callback;
643
+ order_no = _ref.order_no, form = _ref.form, shopId = _ref.shopId, shopList = _ref.shopList, templateDetail = _ref.templateDetail, _ref$type = _ref.type, type = _ref$type === void 0 ? 'add' : _ref$type;
644
644
  shopSourceStr = (_shopList$find = shopList.find(function (item) {
645
645
  return item.shopId == shopId;
646
646
  })) === null || _shopList$find === void 0 ? void 0 : _shopList$find.shopSourceStr;
@@ -793,20 +793,19 @@ export var orderBack = /*#__PURE__*/function () {
793
793
 
794
794
 
795
795
  form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), detailsValue));
796
- callback === null || callback === void 0 ? void 0 : callback(finalResponse);
797
- _context.next = 31;
796
+ _context.next = 30;
798
797
  break;
799
798
 
800
- case 29:
801
- _context.prev = 29;
799
+ case 28:
800
+ _context.prev = 28;
802
801
  _context.t0 = _context["catch"](2);
803
802
 
804
- case 31:
803
+ case 30:
805
804
  case "end":
806
805
  return _context.stop();
807
806
  }
808
807
  }
809
- }, _callee, null, [[2, 29]]);
808
+ }, _callee, null, [[2, 28]]);
810
809
  }));
811
810
 
812
811
  return function orderBack(_x) {
@@ -902,37 +901,4 @@ export var imgResize = function imgResize(url) {
902
901
  var w = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
903
902
  var h = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;
904
903
  return "".concat(url, "?x-oss-process=image/resize,h_").concat(h, ",w_").concat(w);
905
- }; //重复校验数据映射字段
906
-
907
- export var COMPONENT_MAP = {
908
- tradeId: 'TRADE_ID_INPUT',
909
- buyerNick: 'BUYER_NICK_INPUT',
910
- receiveMobile: 'RECEIVER_MOBILE_INPUT',
911
- alipayAccount: 'ALI_PAY_INPUT',
912
- expressLogisticsCode: 'EXPRESS_LOGISTICS_SELECT'
913
- };
914
- export var COMPONENT_MAP_NAME = {
915
- tradeId: '订单号',
916
- buyerNick: '买家昵称',
917
- receiveMobile: '收件人手机号',
918
- alipayAccount: '支付宝账号',
919
- expressLogisticsCode: '快递物流单号'
920
- }; //数据唯一性校验提交数据组装
921
-
922
- export var getReplaceWarnValues = function getReplaceWarnValues(templateDetail, keyValues) {
923
- return templateDetail.componentDtoList.reduce(function (prv, next) {
924
- Object.keys(keyValues).forEach(function (key) {
925
- if (COMPONENT_MAP[key] === next.workOrderComponentType) {
926
- var componentConfig = next.componentConfig;
927
-
928
- if (componentConfig !== null && componentConfig !== void 0 && componentConfig.replaceWarn && keyValues[key]) {
929
- prv.push({
930
- componentKey: "".concat(next.uniqueKey, "_").concat(key),
931
- componentValue: keyValues[key]
932
- });
933
- }
934
- }
935
- });
936
- return prv;
937
- }, []);
938
904
  };
@@ -35,8 +35,6 @@ export declare const login: (data: LoginParams) => Promise<any>;
35
35
  export declare const queryShopList: () => Promise<any>;
36
36
  export declare const deleteWorkOrder: (data: any) => Promise<any>;
37
37
  export declare const getThirdOpenUidByOrderNo: (data: any) => Promise<any>;
38
- export declare const replaceCheck: (data: any) => Promise<any>;
39
38
  export declare const queryCompanyUserList: (data: any) => Promise<any>;
40
- export declare const paymentReplaceCheck: (data: any) => Promise<any>;
41
39
  export declare const appointTo: (data: any) => Promise<any>;
42
40
  export declare const updateFlowStatus: (data: any) => Promise<any>;
@@ -213,14 +213,6 @@ export var getThirdOpenUidByOrderNo = function getThirdOpenUidByOrderNo(data) {
213
213
  method: 'post',
214
214
  data: data
215
215
  });
216
- }; // 重复校验
217
-
218
- export var replaceCheck = function replaceCheck(data) {
219
- return request({
220
- url: '/qy/gdfw/workOrder/repeatCheck',
221
- method: 'post',
222
- data: data
223
- });
224
216
  };
225
217
  export var queryCompanyUserList = function queryCompanyUserList(data) {
226
218
  return request({
@@ -228,14 +220,6 @@ export var queryCompanyUserList = function queryCompanyUserList(data) {
228
220
  method: 'post',
229
221
  data: data
230
222
  });
231
- }; // 打款重复校验
232
-
233
- export var paymentReplaceCheck = function paymentReplaceCheck(data) {
234
- return request({
235
- url: '/qy/payment/paymentOrder/repeatCheck',
236
- method: 'post',
237
- data: data
238
- });
239
223
  };
240
224
  export var appointTo = function appointTo(data) {
241
225
  return request({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmkf-work-order-service-component",
3
- "version": "0.3.3-alpha.1",
3
+ "version": "0.3.3",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@ant-design/icons": "^4.7.0",
42
- "@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.29-alpha.2",
42
+ "@raycloud-apaas-fe-setup/apaas-react-basics-widgets": "^1.0.28-alpha.3",
43
43
  "@reduxjs/toolkit": "^1.8.5",
44
44
  "copy-to-clipboard": "^3.3.3",
45
45
  "js-md5": "^0.7.3",
@@ -1,34 +0,0 @@
1
- .customizeFormModalWrapper {
2
- p,
3
- lable {
4
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
5
- 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
6
- 'Noto Color Emoji';
7
- }
8
- // .ant-modal-body {
9
- // overflow-x: hidden;
10
- // overflow-y: auto;
11
- // }
12
- .ant-select.ant-select-single.ant-select-show-arrow.ant-select-show-search {
13
- margin-bottom: 8px;
14
- }
15
- .ant-picker-suffix,
16
- .ant-select-arrow svg {
17
- color: #4e5969;
18
- }
19
- .status-payment--basic {
20
- .ant-row.ant-form-item {
21
- margin-bottom: 5px;
22
- }
23
- }
24
- .ant-modal-footer {
25
- margin-top: 20px;
26
- }
27
- .ant-input[disabled],
28
- .ant-input-number-disabled {
29
- border: none;
30
- }
31
- .ant-select-disabled .ant-select-arrow svg {
32
- color: #c9cdd4;
33
- }
34
- }