kmkf-work-order-service-component 0.4.10-alpha.7 → 0.4.11
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.
- package/dist/esm/FormRender/index.js +27 -59
- package/dist/esm/FormRender/index.less +1 -1
- package/dist/esm/SingleShopWorkOrder/components/Card/index.less +1 -1
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.js +4 -4
- package/dist/esm/SingleShopWorkOrder/components/CustomizeFormModal/index.less +1 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/CustomizeWorkOrderCard/index.less +1 -1
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/components/RecordLog/index.js +2 -2
- package/dist/esm/WorkOrder/components/CustomizeWorkOrderList/index.js +1 -5
- package/dist/esm/WorkOrder/components/PaymentWorkOrderList/index.js +0 -1
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.d.ts +1 -3
- package/dist/esm/WorkOrder/components/Widget/common/formItemWrap.js +10 -48
- package/dist/esm/WorkOrder/components/Widget/index.d.ts +1 -5
- package/dist/esm/WorkOrder/components/Widget/index.js +0 -16
- package/dist/esm/WorkOrder/index.js +17 -6
- package/dist/esm/common/utils/express.d.ts +0 -1
- package/dist/esm/common/utils/express.js +1 -7
- package/dist/esm/common/utils/tools.d.ts +1 -4
- package/dist/esm/common/utils/tools.js +181 -430
- package/dist/esm/model/servers/api.d.ts +0 -1
- package/dist/esm/model/servers/api.js +0 -8
- package/package.json +2 -2
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.d.ts +0 -17
- package/dist/esm/WorkOrder/components/Widget/jst/JstItemSelect/index.js +0 -129
- package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.d.ts +0 -14
- package/dist/esm/WorkOrder/components/Widget/jst/JstLogistics/index.js +0 -121
- package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.d.ts +0 -14
- package/dist/esm/WorkOrder/components/Widget/jst/JstSendGood/index.js +0 -129
- package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.d.ts +0 -14
- package/dist/esm/WorkOrder/components/Widget/jst/JstSupply/index.js +0 -117
@@ -297,8 +297,7 @@ var FormRender = function FormRender(props, ref) {
|
|
297
297
|
};
|
298
298
|
}
|
299
299
|
|
300
|
-
console.debug('增加数据参数', _params);
|
301
|
-
|
300
|
+
console.debug('增加数据参数', _params);
|
302
301
|
_context.next = 33;
|
303
302
|
return addWorkOrder(_params);
|
304
303
|
|
@@ -376,7 +375,7 @@ var FormRender = function FormRender(props, ref) {
|
|
376
375
|
|
377
376
|
|
378
377
|
var queryReplaceCount = /*#__PURE__*/function () {
|
379
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(componentValue) {
|
378
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(componentValue, templateDetail) {
|
380
379
|
var needCheckComponentList, params, _yield$replaceCheck, resultList, resultParams;
|
381
380
|
|
382
381
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
@@ -426,25 +425,25 @@ var FormRender = function FormRender(props, ref) {
|
|
426
425
|
}, _callee2);
|
427
426
|
}));
|
428
427
|
|
429
|
-
return function queryReplaceCount(_x3) {
|
428
|
+
return function queryReplaceCount(_x3, _x4) {
|
430
429
|
return _ref3.apply(this, arguments);
|
431
430
|
};
|
432
431
|
}(); //自动返填重复校验
|
433
432
|
|
434
433
|
|
435
|
-
var orderBackReplace = function orderBackReplace(value) {
|
436
|
-
var
|
437
|
-
|
434
|
+
var orderBackReplace = function orderBackReplace(value, templateDetail) {
|
435
|
+
var tradeId = value.tradeId,
|
436
|
+
buyer = value.buyer,
|
438
437
|
receiveMobile = value.receiveMobile,
|
439
438
|
alipayAccount = value.alipayAccount,
|
440
439
|
expressLogisticsCode = value.expressLogisticsCode;
|
441
440
|
queryReplaceCount({
|
442
|
-
tradeId:
|
443
|
-
buyerNick: buyerNick,
|
441
|
+
tradeId: tradeId,
|
442
|
+
buyerNick: buyer === null || buyer === void 0 ? void 0 : buyer.buyerNick,
|
444
443
|
receiveMobile: receiveMobile,
|
445
444
|
alipayAccount: alipayAccount,
|
446
445
|
expressLogisticsCode: expressLogisticsCode
|
447
|
-
});
|
446
|
+
}, templateDetail);
|
448
447
|
}; // 切换模板
|
449
448
|
|
450
449
|
|
@@ -495,12 +494,14 @@ var FormRender = function FormRender(props, ref) {
|
|
495
494
|
|
496
495
|
case 11:
|
497
496
|
_templateDetail = _context3.sent;
|
498
|
-
|
497
|
+
_context3.next = 14;
|
498
|
+
return setTemplateDetail(_templateDetail.data);
|
499
|
+
|
500
|
+
case 14:
|
499
501
|
setWorkOrderDetail(_workOrderDetail.data);
|
500
502
|
|
501
503
|
if (workOrderId) {
|
502
504
|
transData = calcWorkOrderList([(_workOrderDetail3 = _workOrderDetail) === null || _workOrderDetail3 === void 0 ? void 0 : _workOrderDetail3.data], _templateDetail === null || _templateDetail === void 0 ? void 0 : (_templateDetail$data = _templateDetail.data) === null || _templateDetail$data === void 0 ? void 0 : _templateDetail$data.componentDtoList);
|
503
|
-
console.log(transData);
|
504
505
|
form.setFieldsValue(_objectSpread(_objectSpread({}, get(transData, '0', {})), {}, {
|
505
506
|
shopId: shopId,
|
506
507
|
shopName: record.shopName,
|
@@ -508,6 +509,7 @@ var FormRender = function FormRender(props, ref) {
|
|
508
509
|
created: record.created,
|
509
510
|
processTime: record.processTime
|
510
511
|
}));
|
512
|
+
orderBackReplace(transData, _templateDetail.data);
|
511
513
|
} else {
|
512
514
|
//获取一些默认数据
|
513
515
|
jsonMap = _templateDetail === null || _templateDetail === void 0 ? void 0 : (_templateDetail$data2 = _templateDetail.data) === null || _templateDetail$data2 === void 0 ? void 0 : _templateDetail$data2.componentDtoList.reduce(function (prv, next) {
|
@@ -544,28 +546,28 @@ var FormRender = function FormRender(props, ref) {
|
|
544
546
|
|
545
547
|
antFormEl = document.getElementsByClassName('ant-form');
|
546
548
|
(antFormEl === null || antFormEl === void 0 ? void 0 : antFormEl.length) > 0 && set(antFormEl, '0.scrollTop', 0);
|
547
|
-
_context3.next =
|
549
|
+
_context3.next = 24;
|
548
550
|
break;
|
549
551
|
|
550
|
-
case
|
551
|
-
_context3.prev =
|
552
|
+
case 21:
|
553
|
+
_context3.prev = 21;
|
552
554
|
_context3.t0 = _context3["catch"](2);
|
553
555
|
console.error('获取模板信息错误', _context3.t0);
|
554
556
|
|
555
|
-
case
|
556
|
-
_context3.prev =
|
557
|
+
case 24:
|
558
|
+
_context3.prev = 24;
|
557
559
|
setLoading(false);
|
558
|
-
return _context3.finish(
|
560
|
+
return _context3.finish(24);
|
559
561
|
|
560
|
-
case
|
562
|
+
case 27:
|
561
563
|
case "end":
|
562
564
|
return _context3.stop();
|
563
565
|
}
|
564
566
|
}
|
565
|
-
}, _callee3, null, [[2,
|
567
|
+
}, _callee3, null, [[2, 21, 24, 27]]);
|
566
568
|
}));
|
567
569
|
|
568
|
-
return function queryDetail(
|
570
|
+
return function queryDetail(_x5) {
|
569
571
|
return _ref5.apply(this, arguments);
|
570
572
|
};
|
571
573
|
}();
|
@@ -622,7 +624,7 @@ var FormRender = function FormRender(props, ref) {
|
|
622
624
|
return _context4.abrupt("return");
|
623
625
|
|
624
626
|
case 3:
|
625
|
-
queryReplaceCount(_defineProperty({}, type, value));
|
627
|
+
queryReplaceCount(_defineProperty({}, type, value), templateDetail);
|
626
628
|
|
627
629
|
if (type === 'tradeId' || type === 'enterprisePaymentTid') {
|
628
630
|
changeHandle(value);
|
@@ -636,7 +638,7 @@ var FormRender = function FormRender(props, ref) {
|
|
636
638
|
}, _callee4);
|
637
639
|
}));
|
638
640
|
|
639
|
-
return function componentOnBlur(
|
641
|
+
return function componentOnBlur(_x6, _x7) {
|
640
642
|
return _ref6.apply(this, arguments);
|
641
643
|
};
|
642
644
|
}(); // 切换店铺
|
@@ -648,47 +650,13 @@ var FormRender = function FormRender(props, ref) {
|
|
648
650
|
setShopId(val); // 清空表单字段
|
649
651
|
|
650
652
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
651
|
-
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE'
|
653
|
+
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
652
654
|
cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
|
653
655
|
}
|
654
656
|
|
655
657
|
return cur;
|
656
658
|
}, []);
|
657
|
-
form.resetFields(needClearFormFields);
|
658
|
-
|
659
|
-
var hasJst = get(templateDetail, 'componentDtoList', []).some(function (item) {
|
660
|
-
return ['JST_LOGISTICS', 'JST_SUPPLY', 'JST_SEND_GOOD'].includes(item.workOrderComponentType);
|
661
|
-
});
|
662
|
-
|
663
|
-
if (hasJst) {
|
664
|
-
var jstValue = get(templateDetail, 'componentDtoList', []).reduce(function (prv, next) {
|
665
|
-
switch (next.workOrderComponentType) {
|
666
|
-
case 'JST_LOGISTICS':
|
667
|
-
prv[next.uniqueKey] = [{
|
668
|
-
logisticsCompany: null,
|
669
|
-
logisticsCode: null
|
670
|
-
}];
|
671
|
-
break;
|
672
|
-
|
673
|
-
case 'JST_SUPPLY':
|
674
|
-
prv[next.uniqueKey] = [{
|
675
|
-
supplyId: null
|
676
|
-
}];
|
677
|
-
break;
|
678
|
-
|
679
|
-
case 'JST_SEND_GOOD':
|
680
|
-
prv[next.uniqueKey] = [{
|
681
|
-
sendName: '',
|
682
|
-
sendId: ''
|
683
|
-
}];
|
684
|
-
break;
|
685
|
-
}
|
686
|
-
|
687
|
-
return prv;
|
688
|
-
}, {});
|
689
|
-
form.setFieldsValue(jstValue);
|
690
|
-
} //切换店铺时,判断是否有订单号 有订单号自动订单返填
|
691
|
-
|
659
|
+
form.resetFields(needClearFormFields); //切换店铺时,判断是否有订单号 有订单号自动订单返填
|
692
660
|
|
693
661
|
var allValue = form.getFieldsValue();
|
694
662
|
var tradeIdUniqueKey = templateDetail === null || templateDetail === void 0 ? void 0 : (_templateDetail$compo3 = templateDetail.componentDtoList.find(function (item) {
|
@@ -463,14 +463,14 @@ var CustomizeFormModal = function CustomizeFormModal(props) {
|
|
463
463
|
|
464
464
|
|
465
465
|
var orderBackReplace = function orderBackReplace(value) {
|
466
|
-
var
|
467
|
-
|
466
|
+
var tradeId = value.tradeId,
|
467
|
+
buyer = value.buyer,
|
468
468
|
receiveMobile = value.receiveMobile,
|
469
469
|
alipayAccount = value.alipayAccount,
|
470
470
|
expressLogisticsCode = value.expressLogisticsCode;
|
471
471
|
queryReplaceCount({
|
472
|
-
tradeId:
|
473
|
-
buyerNick: buyerNick,
|
472
|
+
tradeId: tradeId,
|
473
|
+
buyerNick: buyer === null || buyer === void 0 ? void 0 : buyer.buyerNick,
|
474
474
|
receiveMobile: receiveMobile,
|
475
475
|
alipayAccount: alipayAccount,
|
476
476
|
expressLogisticsCode: expressLogisticsCode
|
@@ -195,7 +195,7 @@ var RecordLog = function RecordLog(props) {
|
|
195
195
|
}
|
196
196
|
}, /*#__PURE__*/React.createElement("span", {
|
197
197
|
style: {
|
198
|
-
|
198
|
+
minWidth: '70px',
|
199
199
|
flexShrink: 1
|
200
200
|
}
|
201
201
|
}, child === null || child === void 0 ? void 0 : child.title, ":"), /*#__PURE__*/React.createElement("span", {
|
@@ -212,7 +212,7 @@ var RecordLog = function RecordLog(props) {
|
|
212
212
|
}
|
213
213
|
}, /*#__PURE__*/React.createElement("span", {
|
214
214
|
style: {
|
215
|
-
|
215
|
+
minWidth: '70px',
|
216
216
|
flexShrink: 1
|
217
217
|
}
|
218
218
|
}, item === null || item === void 0 ? void 0 : item.name, ":"), /*#__PURE__*/React.createElement("span", {
|
@@ -363,7 +363,6 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
363
363
|
}), /*#__PURE__*/React.createElement("p", null, "\u6682\u65E0\u6570\u636E")))), (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 && /*#__PURE__*/React.createElement("div", {
|
364
364
|
className: "custom_box_page"
|
365
365
|
}, /*#__PURE__*/React.createElement(Pagination, _extends({
|
366
|
-
size: "small",
|
367
366
|
onChange: function onChange(page, pageSize) {
|
368
367
|
return _onChange({
|
369
368
|
current: page,
|
@@ -371,10 +370,7 @@ var CustomizeWorkOrderList = function CustomizeWorkOrderList(_ref4) {
|
|
371
370
|
});
|
372
371
|
}
|
373
372
|
}, pagination, {
|
374
|
-
total: total
|
375
|
-
showTotal: function showTotal(total) {
|
376
|
-
return "\u5171".concat(total, "\u6761");
|
377
|
-
}
|
373
|
+
total: total
|
378
374
|
}))), /*#__PURE__*/React.createElement(DeleteCustomizeOrderModal, {
|
379
375
|
submit: submit
|
380
376
|
}), /*#__PURE__*/React.createElement(DealerSelectModal, {
|
@@ -255,7 +255,6 @@ var PaymentWorkOrderList = function PaymentWorkOrderList(_ref) {
|
|
255
255
|
}), /*#__PURE__*/React.createElement("p", null, "\u6682\u65E0\u6570\u636E")))), /*#__PURE__*/React.createElement("div", {
|
256
256
|
className: "custom_box_page"
|
257
257
|
}, /*#__PURE__*/React.createElement(Pagination, {
|
258
|
-
size: "small",
|
259
258
|
showQuickJumper: true,
|
260
259
|
showSizeChanger: false,
|
261
260
|
showTotal: function showTotal(total) {
|
@@ -7,12 +7,10 @@ declare type getFormItemProps = {
|
|
7
7
|
component: JSX.Element | string | null;
|
8
8
|
};
|
9
9
|
export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => JSX.Element;
|
10
|
-
export declare const showImage: ({ item, type
|
10
|
+
export declare const showImage: ({ item, type }: {
|
11
11
|
item: any;
|
12
12
|
type: string;
|
13
|
-
index: number;
|
14
13
|
}) => JSX.Element;
|
15
14
|
export declare const ShowTotalImage: ({ total, allImage, type }: any) => JSX.Element;
|
16
15
|
export declare const GoodImage: ({ list, type }: any) => JSX.Element | null;
|
17
|
-
export declare const JstGoodImage: ({ list, type }: any) => any;
|
18
16
|
export {};
|
@@ -10,9 +10,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
10
10
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
12
12
|
|
13
|
-
import { Form, Button, Modal, Tooltip
|
13
|
+
import { Form, Button, Modal, Tooltip } from 'antd';
|
14
14
|
import React, { useState } from 'react';
|
15
|
-
import express from "../../../../common/utils/express";
|
16
15
|
import styles from "./index.module.less";
|
17
16
|
import defaultImg from "../../../../common/imgs/default-img.png";
|
18
17
|
export var getFormItem = function getFormItem(_ref) {
|
@@ -46,12 +45,10 @@ export var getFormItem = function getFormItem(_ref) {
|
|
46
45
|
|
47
46
|
export var showImage = function showImage(_ref2) {
|
48
47
|
var item = _ref2.item,
|
49
|
-
type = _ref2.type
|
50
|
-
index = _ref2.index;
|
48
|
+
type = _ref2.type;
|
51
49
|
var picUrl = item.picUrl ? (item === null || item === void 0 ? void 0 : item.platform) !== 'tabao' ? item.picUrl : item.picUrl + '_40x40.jpg' : defaultImg;
|
52
50
|
return /*#__PURE__*/React.createElement("div", {
|
53
|
-
className: styles.goodImgBox
|
54
|
-
key: index
|
51
|
+
className: styles.goodImgBox
|
55
52
|
}, (item === null || item === void 0 ? void 0 : item.platform) === 'taobao' ? /*#__PURE__*/React.createElement("a", {
|
56
53
|
target: "_blank",
|
57
54
|
href: "https://item.taobao.com/item.htm?id=".concat(item.numIid)
|
@@ -77,10 +74,10 @@ export var showImage = function showImage(_ref2) {
|
|
77
74
|
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
78
75
|
title: '商品编码',
|
79
76
|
text: item.outerId
|
80
|
-
}),
|
77
|
+
}), type === 'itemThird' && (item.itemId || item.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
81
78
|
title: '供应商编码',
|
82
79
|
text: item.itemId || item.supplierItemOuterId
|
83
|
-
}),
|
80
|
+
}), type === 'itemThird' && item.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
84
81
|
title: '供应商名称',
|
85
82
|
text: item.supplierName
|
86
83
|
}), item.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
@@ -95,7 +92,7 @@ var TextTool = function TextTool(_ref3) {
|
|
95
92
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
96
93
|
placement: "topLeft",
|
97
94
|
title: text
|
98
|
-
}, /*#__PURE__*/React.createElement("
|
95
|
+
}, /*#__PURE__*/React.createElement("p", {
|
99
96
|
style: {
|
100
97
|
overflow: 'hidden',
|
101
98
|
whiteSpace: 'nowrap',
|
@@ -163,10 +160,10 @@ export var ShowTotalImage = function ShowTotalImage(_ref4) {
|
|
163
160
|
}), type === 'itemCode' && /*#__PURE__*/React.createElement(TextTool, {
|
164
161
|
title: '商品编码',
|
165
162
|
text: i.outerId
|
166
|
-
}),
|
163
|
+
}), type === 'itemThird' && (i.itemId || i.supplierItemOuterId) && /*#__PURE__*/React.createElement(TextTool, {
|
167
164
|
title: '供应商编码',
|
168
165
|
text: i.itemId || i.supplierItemOuterId
|
169
|
-
}),
|
166
|
+
}), type === 'itemThird' && i.supplierName && /*#__PURE__*/React.createElement(TextTool, {
|
170
167
|
title: '供应商名称',
|
171
168
|
text: i.supplierName
|
172
169
|
}), i.propertiesName && /*#__PURE__*/React.createElement(TextTool, {
|
@@ -188,49 +185,14 @@ export var GoodImage = function GoodImage(_ref5) {
|
|
188
185
|
style: {
|
189
186
|
display: type === 'itemSelect' ? 'flex' : 'block'
|
190
187
|
}
|
191
|
-
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item
|
188
|
+
}, list === null || list === void 0 ? void 0 : (_list$slice = list.slice(0, initShowTotal)) === null || _list$slice === void 0 ? void 0 : _list$slice.map(function (item) {
|
192
189
|
return showImage({
|
193
190
|
item: item,
|
194
|
-
type: type
|
195
|
-
index: index
|
191
|
+
type: type
|
196
192
|
});
|
197
193
|
}), total > initShowTotal && /*#__PURE__*/React.createElement(ShowTotalImage, {
|
198
194
|
total: total,
|
199
195
|
allImage: list,
|
200
196
|
type: type
|
201
197
|
})) : null;
|
202
|
-
};
|
203
|
-
|
204
|
-
var content = function content(item, index) {
|
205
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
206
|
-
style: {
|
207
|
-
textAlign: 'center'
|
208
|
-
}
|
209
|
-
}, "\u5305\u88F9".concat(index + 1, "\u5546\u54C1\u4FE1\u606F")), ((item === null || item === void 0 ? void 0 : item.items) || []).map(function (t, index) {
|
210
|
-
return /*#__PURE__*/React.createElement("div", {
|
211
|
-
key: index
|
212
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Image, {
|
213
|
-
width: 70,
|
214
|
-
src: t.picUrl,
|
215
|
-
preview: false
|
216
|
-
}), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, t.title), /*#__PURE__*/React.createElement("div", null, "\u7F16\u7801\uFF1A", t.skuId))));
|
217
|
-
}));
|
218
|
-
};
|
219
|
-
|
220
|
-
export var JstGoodImage = function JstGoodImage(_ref6) {
|
221
|
-
var list = _ref6.list,
|
222
|
-
type = _ref6.type;
|
223
|
-
return list.length ? (list || []).map(function (item, index) {
|
224
|
-
var logisticsCompany = item.logisticsCompany;
|
225
|
-
var company = express.getExpressNameByCode(logisticsCompany);
|
226
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Popover, {
|
227
|
-
content: content(item, index)
|
228
|
-
}, /*#__PURE__*/React.createElement("span", {
|
229
|
-
key: index,
|
230
|
-
style: {
|
231
|
-
color: '#1890ff',
|
232
|
-
cursor: 'pointer'
|
233
|
-
}
|
234
|
-
}, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join('/') : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyId) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendName, item.sendId].join('/') : item.sendId ? item.sendId : item.sendName) : null));
|
235
|
-
}) : null;
|
236
198
|
};
|
@@ -24,8 +24,4 @@ import Status from '../Widget/third/Status';
|
|
24
24
|
import Ordinary from '../Widget/third/Ordinary';
|
25
25
|
import ItemSelectThird from '../Widget/third/ItemSelect';
|
26
26
|
import Payment from '../Widget/third/Payment';
|
27
|
-
|
28
|
-
import JstItemSelect from './jst/JstItemSelect';
|
29
|
-
import JstSupply from './jst/JstSupply';
|
30
|
-
import JstSendGood from './jst/JstSendGood';
|
31
|
-
export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | CommonDataTime | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment | JstLogistics | JstItemSelect | JstSupply | JstSendGood;
|
27
|
+
export declare const factory: (type: string, options: any) => BasicInput | BasicRadio | BasicTextArea | BasicCheckBox | BasicDateTime | BasicSelect | BasicPicture | BasicMultSelect | BasicCascader | BasicAddress | BasicGrade | BasicRate | CommonDataTime | EBuyerNick | EReceiverAddress | ELogistics | EReturnLogistics | ERemark | EItemSelect | EItemId | EItemEncode | EAlipay | Status | Ordinary | ItemSelectThird | Payment;
|
@@ -31,10 +31,6 @@ import Ordinary from "../Widget/third/Ordinary";
|
|
31
31
|
import ItemSelectThird from "../Widget/third/ItemSelect";
|
32
32
|
import Payment from "../Widget/third/Payment";
|
33
33
|
import SystemOrderNo from "../Widget/third/SystemOrderNo";
|
34
|
-
import JstLogistics from "./jst/JstLogistics";
|
35
|
-
import JstItemSelect from "./jst/JstItemSelect";
|
36
|
-
import JstSupply from "./jst/JstSupply";
|
37
|
-
import JstSendGood from "./jst/JstSendGood";
|
38
34
|
export var factory = function factory(type, options) {
|
39
35
|
switch (type) {
|
40
36
|
case 'INPUT':
|
@@ -145,18 +141,6 @@ export var factory = function factory(type, options) {
|
|
145
141
|
case 'UPDATE_DATETIME':
|
146
142
|
return new CommonDataTime(options);
|
147
143
|
|
148
|
-
case 'JST_LOGISTICS':
|
149
|
-
return new JstLogistics(options);
|
150
|
-
|
151
|
-
case 'JST_ITEM_SELECT_THIRD':
|
152
|
-
return new JstItemSelect(options);
|
153
|
-
|
154
|
-
case 'JST_SUPPLY':
|
155
|
-
return new JstSupply(options);
|
156
|
-
|
157
|
-
case 'JST_SEND_GOOD':
|
158
|
-
return new JstSendGood(options);
|
159
|
-
|
160
144
|
default:
|
161
145
|
return new BasicInput(options);
|
162
146
|
}
|
@@ -20,7 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
*
|
21
21
|
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
22
22
|
*/
|
23
|
-
import React, { useState, useEffect, useLayoutEffect
|
23
|
+
import React, { useState, useEffect, useLayoutEffect } from 'react';
|
24
24
|
import { Spin, ConfigProvider } from 'antd';
|
25
25
|
import { Provider } from 'react-redux';
|
26
26
|
import { useAppSelector, useAppDispatch } from "../model/hooks";
|
@@ -59,6 +59,11 @@ var WorkOrder = function WorkOrder(props) {
|
|
59
59
|
tabActive = _useState2[0],
|
60
60
|
setTabActive = _useState2[1];
|
61
61
|
|
62
|
+
var _useState3 = useState(true),
|
63
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
64
|
+
isEmpower = _useState4[0],
|
65
|
+
setIsEmpower = _useState4[1];
|
66
|
+
|
62
67
|
useEffect(function () {
|
63
68
|
if (buyerId) {
|
64
69
|
dispatch({
|
@@ -120,13 +125,19 @@ var WorkOrder = function WorkOrder(props) {
|
|
120
125
|
express.initData();
|
121
126
|
formatAddrData.initData();
|
122
127
|
}; //判断是否店铺是否授权
|
128
|
+
// const isEmpower = useMemo(() => {
|
129
|
+
// return (shopList || []).some((item: any) => item.shopId == shopId);
|
130
|
+
// }, [shopList]);
|
123
131
|
|
124
132
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
133
|
+
useEffect(function () {
|
134
|
+
if (shopList !== null && shopList !== void 0 && shopList.length) {
|
135
|
+
var _isEmpower = (shopList || []).some(function (item) {
|
136
|
+
return item.shopId == shopId;
|
137
|
+
});
|
138
|
+
|
139
|
+
setIsEmpower(_isEmpower);
|
140
|
+
}
|
130
141
|
}, [shopList]);
|
131
142
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Spin, {
|
132
143
|
spinning: loading
|
@@ -33,13 +33,7 @@ var express = {
|
|
33
33
|
var item = (this.expressData || []).filter(function (item) {
|
34
34
|
return item.value === code;
|
35
35
|
});
|
36
|
-
return item.length ? item[0].label :
|
37
|
-
},
|
38
|
-
getExpressNameByName: function getExpressNameByName(name) {
|
39
|
-
var item = (this.expressData || []).filter(function (item) {
|
40
|
-
return item.label === name;
|
41
|
-
});
|
42
|
-
return item.length ? item[0].value : name;
|
36
|
+
return item.length ? item[0].label : '';
|
43
37
|
}
|
44
38
|
};
|
45
39
|
export default express;
|
@@ -34,7 +34,7 @@ export declare const submitDataTransOldFormat: (nowData: {
|
|
34
34
|
}) => any;
|
35
35
|
export declare const filterComponent: (originDataSource?: never[]) => never[];
|
36
36
|
export declare const radioTextHandle: (radioValue: any, radioOtherValue: any) => any;
|
37
|
-
export declare const jsonParseSecurity: (value: string, securityValue:
|
37
|
+
export declare const jsonParseSecurity: (value: string, securityValue: string | never[]) => any;
|
38
38
|
export interface TemplateColumnConfig {
|
39
39
|
componentConfig: any;
|
40
40
|
enabled: boolean;
|
@@ -78,6 +78,3 @@ export declare const getReplaceWarnValues: (templateDetail: {
|
|
78
78
|
}, keyValues: {
|
79
79
|
[x: string]: any;
|
80
80
|
}) => any;
|
81
|
-
export declare const taobaoGoodHandle: (arr: any[], type: string, config: any) => any;
|
82
|
-
export declare const HasJstHandle: (templateDetail: any) => any;
|
83
|
-
export declare const updateJSTItemListHandle: (list: any[] | undefined, type: string | undefined, config: any) => any;
|