@kmkf-fe-packages/kmkf-work-order-service-component 0.24.1 → 0.24.2-beta.0
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/FlowTemplateDetail/components/FormRender/index.js +26 -5
- package/dist/esm/FlowTemplateDetail/index.js +2 -1
- package/dist/esm/WorkOrder/index.js +2 -1
- package/dist/esm/common/utils/tools.d.ts +1 -0
- package/dist/esm/common/utils/tools.js +186 -62
- package/dist/esm/model/logicFlow/selector.d.ts +3 -0
- package/dist/esm/model/servers/api.d.ts +1 -0
- package/dist/esm/model/servers/api.js +10 -0
- package/package.json +5 -5
|
@@ -28,10 +28,10 @@ import { get, some, set, every, cloneDeep, isEmpty, intersection, throttle } fro
|
|
|
28
28
|
import 'moment/locale/zh-cn';
|
|
29
29
|
import { calcWorkOrderList, orderBack, getReplaceWarnValues, COMPONENT_MAP_NAME, EXCLUDE_REPLACE_TOP_COMPONENT,
|
|
30
30
|
// 重复检验不需要展示在顶部的
|
|
31
|
-
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, setLogisticsInfo } from "../../../common/utils/tools";
|
|
31
|
+
INNER_REPLACE_COMPONENT, reversalFormValues, bsSystemOrderBackValues, wlnSystemOrderBackValues, getMappingConfigByTemplateDetail, wdtSystemOrderBackValues, setLogisticsInfo } from "../../../common/utils/tools";
|
|
32
32
|
import { replaceCheck, orderDetail } from "../../../model/servers/api";
|
|
33
33
|
import { factory } from '@kmkf-fe-packages/services-components';
|
|
34
|
-
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
34
|
+
import { AddressData, ExpressData, ExpressInterceptData, PlatData, LogisticsAddressData, getExpression, formatDisplayConfig, BsAddressData, WdtAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
35
35
|
import ShopName from "../ShopName";
|
|
36
36
|
import { PlatForm } from "../../../model/flowTemplateDetail/types";
|
|
37
37
|
import { groupByPreNode, getCurrentNodeModifiedShowHideRule } from "./common";
|
|
@@ -117,6 +117,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
117
117
|
PlatData.getInstance();
|
|
118
118
|
LogisticsAddressData.getInstance();
|
|
119
119
|
BsAddressData.getInstance();
|
|
120
|
+
WdtAddressData.getInstance();
|
|
120
121
|
var _Form$useForm = Form.useForm(),
|
|
121
122
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
122
123
|
preNodeForm = _Form$useForm2[0];
|
|
@@ -132,7 +133,17 @@ var FormRender = function FormRender(props, ref) {
|
|
|
132
133
|
// TODO: 前置节点form单独设置指
|
|
133
134
|
useEffect(function () {
|
|
134
135
|
if (!isEmpty(record)) {
|
|
135
|
-
var
|
|
136
|
+
var preNodeComponentDtoList = cloneDeep((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.preNodeComponentDtoList) || []);
|
|
137
|
+
var componentTemplateConfigVos = cloneDeep((templateDetail === null || templateDetail === void 0 ? void 0 : templateDetail.componentTemplateConfigVos) || []);
|
|
138
|
+
preNodeComponentDtoList.forEach(function (item) {
|
|
139
|
+
var currentConfig = componentTemplateConfigVos.find(function (configItem) {
|
|
140
|
+
return configItem.componentUniqueKey === item.uniqueKey;
|
|
141
|
+
});
|
|
142
|
+
if (currentConfig !== null && currentConfig !== void 0 && currentConfig.config) {
|
|
143
|
+
item.componentConfig = currentConfig.config;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
var transData = calcWorkOrderList([record], preNodeComponentDtoList);
|
|
136
147
|
preNodeForm.setFieldsValue(_objectSpread({}, get(transData, '0', {})));
|
|
137
148
|
fillByShopId(get(transData, '0', {}).shopId);
|
|
138
149
|
}
|
|
@@ -515,6 +526,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
515
526
|
//订单返填
|
|
516
527
|
var changeHandle = function changeHandle(order_no) {
|
|
517
528
|
if (!order_no) return;
|
|
529
|
+
console.log('[订单返填 changeHandle order_no ] >', order_no);
|
|
518
530
|
orderBack({
|
|
519
531
|
order_no: order_no,
|
|
520
532
|
form: form,
|
|
@@ -547,6 +559,13 @@ var FormRender = function FormRender(props, ref) {
|
|
|
547
559
|
form: form
|
|
548
560
|
});
|
|
549
561
|
}
|
|
562
|
+
if (workOrderComponentType === 'WDT_SYSTEM_ORDER') {
|
|
563
|
+
wdtSystemOrderBackValues({
|
|
564
|
+
templateList: templateDetail,
|
|
565
|
+
value: value,
|
|
566
|
+
form: form
|
|
567
|
+
});
|
|
568
|
+
}
|
|
550
569
|
if (logisticsMappingConfig && ['INPUT', 'EXPRESS_LOGISTICS_SELECT', 'BS_LOGISTICS'].includes(workOrderComponentType)) {
|
|
551
570
|
setLogisticsInfo({
|
|
552
571
|
logisticsMappingConfig: logisticsMappingConfig,
|
|
@@ -596,7 +615,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
596
615
|
setShopId(val);
|
|
597
616
|
// 清空表单字段
|
|
598
617
|
var needClearFormFields = get(templateDetail, 'componentDtoList', []).reduce(function (cur, nxt) {
|
|
599
|
-
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
618
|
+
if (['ITEM_SELECT_THIRD', 'STATUS', 'ITEM_SELECT', 'ITEM_ID', 'ITEM_ENCODE', 'JST_LOGISTICS', 'JST_ITEM_SELECT_THIRD', 'JST_SUPPLY', 'JST_SEND_GOOD', 'BS_GOODS', 'BS_EXCHANGE_GOODS', 'BS_REISSUE_GOODS', 'BS_RETURN_GOODS', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WDT_SYSTEM_ORDER', 'WDT_REISSUE_GOODS'].includes(nxt === null || nxt === void 0 ? void 0 : nxt.workOrderComponentType)) {
|
|
600
619
|
cur.push(nxt === null || nxt === void 0 ? void 0 : nxt.uniqueKey);
|
|
601
620
|
}
|
|
602
621
|
return cur;
|
|
@@ -634,13 +653,14 @@ var FormRender = function FormRender(props, ref) {
|
|
|
634
653
|
}
|
|
635
654
|
//如果有bs组件 设置成初始值
|
|
636
655
|
var hasBs = get(templateDetail, 'componentDtoList', []).some(function (item) {
|
|
637
|
-
return ['BS_LOGISTICS', 'BS_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType);
|
|
656
|
+
return ['BS_LOGISTICS', 'BS_SEND_GOOD', 'WDT_LOGISTICS', 'WDT_SEND_GOOD', 'WLN_LOGISTICS', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType);
|
|
638
657
|
});
|
|
639
658
|
if (hasBs) {
|
|
640
659
|
var bsValue = get(templateDetail, 'componentDtoList', []).reduce(function (prv, next) {
|
|
641
660
|
switch (next.workOrderComponentType) {
|
|
642
661
|
case 'BS_LOGISTICS':
|
|
643
662
|
case 'WLN_LOGISTICS':
|
|
663
|
+
case 'WDT_LOGISTICS':
|
|
644
664
|
prv[next.uniqueKey] = [{
|
|
645
665
|
logisticsCompany: null,
|
|
646
666
|
logisticsCode: null
|
|
@@ -648,6 +668,7 @@ var FormRender = function FormRender(props, ref) {
|
|
|
648
668
|
break;
|
|
649
669
|
case 'BS_SEND_GOOD':
|
|
650
670
|
case 'WLN_SEND_GOOD':
|
|
671
|
+
case 'WDT_SEND_GOOD':
|
|
651
672
|
prv[next.uniqueKey] = [{
|
|
652
673
|
sendName: '',
|
|
653
674
|
sendId: ''
|
|
@@ -20,7 +20,7 @@ import { get, find, isEmpty } from 'lodash';
|
|
|
20
20
|
import { useDispatch, useSelector, Provider, batch } from 'react-redux';
|
|
21
21
|
import store from "../model/store";
|
|
22
22
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
23
|
-
import { AddressData, ExpressData, ExpressInterceptData, PlatData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
23
|
+
import { AddressData, ExpressData, ExpressInterceptData, PlatData, BsAddressData, WdtAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
24
|
import { calcWorkOrderList, deleteCacheOrder } from "../common/utils/tools";
|
|
25
25
|
import { setPlat, fetchPanelInfo, fetchAllFlowOperateRecord, setAction, setVisibleRemarkList, setAddRemarkVisible, setLoading, setClearStore } from "../model/flowTemplateDetail";
|
|
26
26
|
import { selectFlowRecordList, selectRemarkRecordList, selectCurrentNodeDetail, selectTid, selectShopUniqueKey, selectOperateParams, selectFlowStatus, selectCurrentTradeIdWOrkOrderNumber, selectFlowTemplateId, selectLoading, selectWithDrawOrder, selectNodeAssistantMap, selectFlowTemplateType } from "../model/flowTemplateDetail/selector";
|
|
@@ -144,6 +144,7 @@ var FlowTemplateDetail = function FlowTemplateDetail(props) {
|
|
|
144
144
|
ExpressInterceptData.getInstance();
|
|
145
145
|
PlatData.getInstance();
|
|
146
146
|
BsAddressData.getInstance();
|
|
147
|
+
WdtAddressData.getInstance();
|
|
147
148
|
};
|
|
148
149
|
var onUpdateRemark = function onUpdateRemark(remark) {
|
|
149
150
|
var flag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -22,7 +22,7 @@ import { fetchQueryCurrentCompanyUser } from "../model/workOrder";
|
|
|
22
22
|
import { fetchLogicFlowList } from "../model/logicFlow";
|
|
23
23
|
import { setCurrentBuyerChecked, showPayment } from "../model/customizeWorkOrder";
|
|
24
24
|
import store from "../model/store";
|
|
25
|
-
import { AddressData, BsAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
|
+
import { AddressData, BsAddressData, WdtAddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
26
26
|
import OrderList from "./components/WorkOrderList";
|
|
27
27
|
import Reminder from "./components/Reminder";
|
|
28
28
|
import PaymentWorkOrderList from "./components/PaymentWorkOrderList";
|
|
@@ -113,6 +113,7 @@ var WorkOrder = function WorkOrder(props) {
|
|
|
113
113
|
// ExpressData.getInstance();
|
|
114
114
|
AddressData.getInstance();
|
|
115
115
|
BsAddressData.getInstance();
|
|
116
|
+
WdtAddressData.getInstance();
|
|
116
117
|
// ExpressInterceptData.getInstance();
|
|
117
118
|
};
|
|
118
119
|
//判断是否店铺是否授权
|
|
@@ -103,6 +103,7 @@ export declare const deleteCacheOrder: ({ templateList, values, nodeId, flowTemp
|
|
|
103
103
|
}) => void;
|
|
104
104
|
export declare const bsSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
105
105
|
export declare const wlnSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
106
|
+
export declare const wdtSystemOrderBackValues: ({ templateList, value, form }: any) => void;
|
|
106
107
|
export declare const getMappingConfigByTemplateDetail: (templateDetail: {
|
|
107
108
|
componentDtoList: any;
|
|
108
109
|
uniqueKey: string;
|
|
@@ -19,9 +19,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
19
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
20
|
import { get, every, maxBy } from 'lodash';
|
|
21
21
|
import V from 'voca';
|
|
22
|
-
import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail } from "../../model/servers/api";
|
|
22
|
+
import { orderDetail, jstOrderDetail, bsOrderDetail, wlnOrderDetail, wdtOrderDetail } from "../../model/servers/api";
|
|
23
23
|
import moment from 'moment';
|
|
24
|
-
import { AddressData, ExpressData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, unTransField } from '@kmkf-fe-packages/kmkf-utils';
|
|
24
|
+
import { AddressData, ExpressData, orderBackFormValues, bsOrderBackFormValues, wlnOrderBackFormValues, wdtOrderBackFormValues, findLabelBySelectValue, request, isNull, bsOrderTransform, wlnOrderTransform, wdtOrderTransform, unTransField } from '@kmkf-fe-packages/kmkf-utils';
|
|
25
25
|
import { cloneDeep, isEqual, set } from 'lodash';
|
|
26
26
|
import Monitor from 'kmkf-monitor';
|
|
27
27
|
import { PlatForm } from "../../model/flowTemplateDetail/types";
|
|
@@ -644,7 +644,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
644
644
|
}),
|
|
645
645
|
name: item.name
|
|
646
646
|
});
|
|
647
|
-
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
647
|
+
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS', 'WDT_LOGISTICS'].includes(item.workOrderComponentType)) {
|
|
648
648
|
var logisticsMap = {
|
|
649
649
|
BS_LOGISTICS: {
|
|
650
650
|
list: 'bsLogisticsList',
|
|
@@ -655,6 +655,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
655
655
|
list: 'wlnLogisticsList',
|
|
656
656
|
company: 'wlnLogisticsCompany',
|
|
657
657
|
code: 'wlnLogisticsCode'
|
|
658
|
+
},
|
|
659
|
+
WDT_LOGISTICS: {
|
|
660
|
+
list: 'wdtLogisticsList',
|
|
661
|
+
company: 'wdtLogisticsCompany',
|
|
662
|
+
code: 'wdtLogisticsCode'
|
|
658
663
|
}
|
|
659
664
|
};
|
|
660
665
|
var bsLogisticsList = get(nowData, "".concat(item.uniqueKey), []);
|
|
@@ -690,7 +695,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
690
695
|
}),
|
|
691
696
|
name: item.name
|
|
692
697
|
});
|
|
693
|
-
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD'].includes(item.workOrderComponentType)) {
|
|
698
|
+
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD'].includes(item.workOrderComponentType)) {
|
|
694
699
|
var sendGoodMap = {
|
|
695
700
|
BS_SEND_GOOD: {
|
|
696
701
|
list: 'bsSendGood',
|
|
@@ -701,6 +706,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
701
706
|
list: 'wlnSendGood',
|
|
702
707
|
id: 'wlnSendId',
|
|
703
708
|
name: 'wlnSendName'
|
|
709
|
+
},
|
|
710
|
+
WDT_SEND_GOOD: {
|
|
711
|
+
list: 'wdtSendGood',
|
|
712
|
+
id: 'wdtSendId',
|
|
713
|
+
name: 'wdtSendName'
|
|
704
714
|
}
|
|
705
715
|
};
|
|
706
716
|
var bsSendList = get(nowData, "".concat(item.uniqueKey), []);
|
|
@@ -764,16 +774,26 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
764
774
|
}),
|
|
765
775
|
name: item.name
|
|
766
776
|
});
|
|
767
|
-
} else if (item.workOrderComponentType
|
|
768
|
-
var
|
|
777
|
+
} else if (['BS_GOODS', 'WDT_GOODS'].includes(item.workOrderComponentType)) {
|
|
778
|
+
var gooodsMap = {
|
|
779
|
+
BS_GOODS: {
|
|
780
|
+
type: 'bsGoods',
|
|
781
|
+
shopCode: 'shopCode'
|
|
782
|
+
},
|
|
783
|
+
WDT_GOODS: {
|
|
784
|
+
type: 'wdtGoods',
|
|
785
|
+
shopCode: 'shopCode'
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
var goods = get(nowData, "".concat(item.uniqueKey), {});
|
|
769
789
|
contentVoList.push({
|
|
770
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
771
|
-
content:
|
|
790
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(gooodsMap[item.workOrderComponentType].type),
|
|
791
|
+
content: goods === null || goods === void 0 ? void 0 : goods[gooodsMap[item.workOrderComponentType].type],
|
|
772
792
|
name: item.name
|
|
773
793
|
});
|
|
774
794
|
contentVoList.push({
|
|
775
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
776
|
-
content: (
|
|
795
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(gooodsMap[item.workOrderComponentType].shopCode),
|
|
796
|
+
content: (goods === null || goods === void 0 ? void 0 : goods[gooodsMap[item.workOrderComponentType].shopCode]) || '',
|
|
777
797
|
name: item.name
|
|
778
798
|
});
|
|
779
799
|
} else if (item.workOrderComponentType === 'BS_EXCHANGE_GOODS') {
|
|
@@ -826,21 +846,33 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
826
846
|
name: item.name
|
|
827
847
|
});
|
|
828
848
|
}
|
|
829
|
-
} else if (item.workOrderComponentType
|
|
830
|
-
var
|
|
849
|
+
} else if (['BS_REISSUE_GOODS', 'WDT_REISSUE_GOODS'].includes(item.workOrderComponentType)) {
|
|
850
|
+
var reissueMap = {
|
|
851
|
+
BS_REISSUE_GOODS: {
|
|
852
|
+
type: 'bsReissueType',
|
|
853
|
+
goods: 'bsReissueGoods',
|
|
854
|
+
shopCode: 'shopCode'
|
|
855
|
+
},
|
|
856
|
+
WDT_REISSUE_GOODS: {
|
|
857
|
+
type: 'wdtReissueType',
|
|
858
|
+
goods: 'wdtReissueGoods',
|
|
859
|
+
shopCode: 'shopCode'
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
var reissue = get(nowData, "".concat(item.uniqueKey), {});
|
|
831
863
|
contentVoList.push({
|
|
832
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
833
|
-
content:
|
|
864
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(reissueMap[item.workOrderComponentType].type),
|
|
865
|
+
content: reissue === null || reissue === void 0 ? void 0 : reissue[reissueMap[item.workOrderComponentType].type],
|
|
834
866
|
name: item.name
|
|
835
867
|
});
|
|
836
868
|
contentVoList.push({
|
|
837
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
838
|
-
content:
|
|
869
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(reissueMap[item.workOrderComponentType].goods),
|
|
870
|
+
content: reissue === null || reissue === void 0 ? void 0 : reissue[reissueMap[item.workOrderComponentType].goods],
|
|
839
871
|
name: item.name
|
|
840
872
|
});
|
|
841
873
|
contentVoList.push({
|
|
842
|
-
uniqueKey: "".concat(item.uniqueKey, "
|
|
843
|
-
content: (
|
|
874
|
+
uniqueKey: "".concat(item.uniqueKey, "_").concat(reissueMap[item.workOrderComponentType].shopCode),
|
|
875
|
+
content: (reissue === null || reissue === void 0 ? void 0 : reissue.shopCode) || '',
|
|
844
876
|
name: item.name
|
|
845
877
|
});
|
|
846
878
|
} else if (item.workOrderComponentType === 'BS_RETURN_GOODS') {
|
|
@@ -886,7 +918,7 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
886
918
|
content: get(nowData, "".concat(item.uniqueKey, ".postingReceiverMobile"), ''),
|
|
887
919
|
name: item.name
|
|
888
920
|
});
|
|
889
|
-
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER'].includes(item.workOrderComponentType)) {
|
|
921
|
+
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(item.workOrderComponentType)) {
|
|
890
922
|
var systemOrderMap = {
|
|
891
923
|
BS_SYSTEM_ORDER: {
|
|
892
924
|
no: 'bsSystemOrderNo',
|
|
@@ -897,6 +929,11 @@ export var submitDataTransOldFormat = function submitDataTransOldFormat(nowData,
|
|
|
897
929
|
no: 'wlnSystemOrderNo',
|
|
898
930
|
ids: 'wlnSystemSelectIds',
|
|
899
931
|
order: 'wlnSystemShowOrder'
|
|
932
|
+
},
|
|
933
|
+
WDT_SYSTEM_ORDER: {
|
|
934
|
+
no: 'wdtSystemOrderNo',
|
|
935
|
+
ids: 'wdtSystemSelectIds',
|
|
936
|
+
order: 'wdtSystemShowOrder'
|
|
900
937
|
}
|
|
901
938
|
};
|
|
902
939
|
var selectIds = get(nowData, "".concat(item.uniqueKey, ".selectIds"), '');
|
|
@@ -1068,9 +1105,11 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1068
1105
|
} else if (nex.workOrderComponentType === 'FILE') {
|
|
1069
1106
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_file")], [])));
|
|
1070
1107
|
} else if (nex.workOrderComponentType === 'POSTING') {
|
|
1071
|
-
var
|
|
1108
|
+
var _nex$componentConfig;
|
|
1109
|
+
var needTrans = ((_nex$componentConfig = nex.componentConfig) === null || _nex$componentConfig === void 0 ? void 0 : _nex$componentConfig.showField) !== 'wdt';
|
|
1110
|
+
var address = [needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingProvince")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingProvince")], needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingCity")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingCity")]];
|
|
1072
1111
|
//兼容地址是只有省市的
|
|
1073
|
-
var interceptDistrict = transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")]);
|
|
1112
|
+
var interceptDistrict = needTrans ? transTextToNumber(item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")]) : item.jsonMap["".concat(nex.uniqueKey, "_postingDistrict")];
|
|
1074
1113
|
interceptDistrict && address.push(interceptDistrict);
|
|
1075
1114
|
address = every(address, function (item) {
|
|
1076
1115
|
return !item;
|
|
@@ -1319,13 +1358,16 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1319
1358
|
reason: '',
|
|
1320
1359
|
systemOrderId: ''
|
|
1321
1360
|
}])));
|
|
1322
|
-
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS'].includes(nex.workOrderComponentType)) {
|
|
1361
|
+
} else if (['BS_LOGISTICS', 'WLN_LOGISTICS', 'WDT_LOGISTICS'].includes(nex.workOrderComponentType)) {
|
|
1323
1362
|
var LogisticsMap = {
|
|
1324
1363
|
BS_LOGISTICS: {
|
|
1325
1364
|
listKey: 'bsLogisticsList'
|
|
1326
1365
|
},
|
|
1327
1366
|
WLN_LOGISTICS: {
|
|
1328
1367
|
listKey: 'wlnLogisticsList'
|
|
1368
|
+
},
|
|
1369
|
+
WDT_LOGISTICS: {
|
|
1370
|
+
listKey: 'wdtLogisticsList'
|
|
1329
1371
|
}
|
|
1330
1372
|
};
|
|
1331
1373
|
var _itemList7 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(LogisticsMap[nex.workOrderComponentType].listKey)], [{
|
|
@@ -1336,13 +1378,16 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1336
1378
|
logisticsCompany: null,
|
|
1337
1379
|
logisticsCode: null
|
|
1338
1380
|
}]));
|
|
1339
|
-
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD'].includes(nex.workOrderComponentType)) {
|
|
1381
|
+
} else if (['BS_SEND_GOOD', 'WLN_SEND_GOOD', 'WDT_SEND_GOOD'].includes(nex.workOrderComponentType)) {
|
|
1340
1382
|
var sendGoodMap = {
|
|
1341
1383
|
BS_SEND_GOOD: {
|
|
1342
1384
|
list: 'bsSendGood'
|
|
1343
1385
|
},
|
|
1344
1386
|
WLN_SEND_GOOD: {
|
|
1345
1387
|
list: 'wlnSendGood'
|
|
1388
|
+
},
|
|
1389
|
+
WDT_SEND_GOOD: {
|
|
1390
|
+
list: 'wdtSendGood'
|
|
1346
1391
|
}
|
|
1347
1392
|
};
|
|
1348
1393
|
var _itemList8 = jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(sendGoodMap[nex.workOrderComponentType].list)], [{
|
|
@@ -1367,11 +1412,19 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1367
1412
|
postingReceiverName: item.jsonMap["".concat(nex.uniqueKey, "_bsPostingReceiverName")],
|
|
1368
1413
|
postingReceiverMobile: item.jsonMap["".concat(nex.uniqueKey, "_bsPostingReceiverMobile")]
|
|
1369
1414
|
}));
|
|
1370
|
-
} else if (nex.workOrderComponentType
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1415
|
+
} else if (['BS_GOODS', 'WDT_GOODS'].includes(nex.workOrderComponentType)) {
|
|
1416
|
+
var _$concat;
|
|
1417
|
+
var gooodsMap = {
|
|
1418
|
+
BS_GOODS: {
|
|
1419
|
+
type: 'bsGoods',
|
|
1420
|
+
shopCode: 'shopCode'
|
|
1421
|
+
},
|
|
1422
|
+
WDT_GOODS: {
|
|
1423
|
+
type: 'wdtGoods',
|
|
1424
|
+
shopCode: 'shopCode'
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), (_$concat = {}, _defineProperty(_$concat, gooodsMap[nex.workOrderComponentType].type, jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_").concat(gooodsMap[nex.workOrderComponentType].type)], [])), _defineProperty(_$concat, gooodsMap[nex.workOrderComponentType].shopCode, item.jsonMap["".concat(nex.uniqueKey, "_").concat(gooodsMap[nex.workOrderComponentType].shopCode)]), _$concat)));
|
|
1375
1428
|
} else if (nex.workOrderComponentType === 'BS_REISSUE_GOODS') {
|
|
1376
1429
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1377
1430
|
bsReissueType: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsReissueType")], []),
|
|
@@ -1426,7 +1479,7 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1426
1479
|
bsReturnGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_bsReturnGoods")], []),
|
|
1427
1480
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1428
1481
|
}));
|
|
1429
|
-
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
|
|
1482
|
+
} else if (['BS_SYSTEM_ORDER', 'WLN_SYSTEM_ORDER', 'WDT_SYSTEM_ORDER'].includes(nex.workOrderComponentType)) {
|
|
1430
1483
|
var systemOrderMap = {
|
|
1431
1484
|
BS_SYSTEM_ORDER: {
|
|
1432
1485
|
no: 'bsSystemOrderNo',
|
|
@@ -1437,6 +1490,11 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1437
1490
|
no: 'wlnSystemOrderNo',
|
|
1438
1491
|
ids: 'wlnSystemSelectIds',
|
|
1439
1492
|
order: 'wlnSystemShowOrder'
|
|
1493
|
+
},
|
|
1494
|
+
WDT_SYSTEM_ORDER: {
|
|
1495
|
+
no: 'wdtSystemOrderNo',
|
|
1496
|
+
ids: 'wdtSystemSelectIds',
|
|
1497
|
+
order: 'wdtSystemShowOrder'
|
|
1440
1498
|
}
|
|
1441
1499
|
};
|
|
1442
1500
|
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
@@ -1484,6 +1542,12 @@ var transDataSource = function transDataSource(templateColumns) {
|
|
|
1484
1542
|
wlnGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wlnGoods")], []),
|
|
1485
1543
|
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1486
1544
|
}));
|
|
1545
|
+
} else if (nex.workOrderComponentType === 'WDT_REISSUE_GOODS') {
|
|
1546
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, "".concat(nex.uniqueKey), {
|
|
1547
|
+
wdtReissueType: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtReissueType")], []),
|
|
1548
|
+
wdtReissueGoods: jsonParseSecurity(item.jsonMap["".concat(nex.uniqueKey, "_wdtReissueGoods")], []),
|
|
1549
|
+
shopCode: item.jsonMap["".concat(nex.uniqueKey, "_shopCode")]
|
|
1550
|
+
}));
|
|
1487
1551
|
}
|
|
1488
1552
|
}, {});
|
|
1489
1553
|
};
|
|
@@ -1505,7 +1569,7 @@ export var calcWorkOrderList = function calcWorkOrderList(source, templateColumn
|
|
|
1505
1569
|
//订单返填
|
|
1506
1570
|
export var orderBack = /*#__PURE__*/function () {
|
|
1507
1571
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
|
|
1508
|
-
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, orderInfo, jstInfo, bsOrders, wlnOrders, bsInfo, wlnInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo,
|
|
1572
|
+
var order_no, form, shopId, shopList, templateDetail, _ref$type, type, callback, fromQNCreateWorkOrderByOrderNo, _ref$plat, plat, JOIN_SHOP, hasBs, hasWdt, hasWln, _ref3, shopSourceStr, _ref3$thirdUserNick, thirdUserNick, _data$value, _jstOrder$value, _jstOrder$value$data, _bsOrder$value, _wlnOrder$value, _wdtOrder$value, _bsOrders$orders, _wlnOrders$orders, promise, hasJst, _yield$Promise$allSet, _yield$Promise$allSet2, data, jstOrder, bsOrder, wlnOrder, wdtOrder, orderInfo, jstInfo, bsOrders, wlnOrders, wdtOrders, bsInfo, wlnInfo, wdtInfo, formValue, detail, hasSelectItem, erpPromiseList, list, promises, _detail$itemList, values, _templateDetail$compo, paymentUniqueKey, cacheOrderInfo, _objectSpread70, _cacheOrderInfo;
|
|
1509
1573
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1510
1574
|
while (1) switch (_context.prev = _context.next) {
|
|
1511
1575
|
case 0:
|
|
@@ -1514,18 +1578,28 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1514
1578
|
JOIN_SHOP = shopList.find(function (item) {
|
|
1515
1579
|
return !item.notJoin && item.shopId == shopId;
|
|
1516
1580
|
}); //判断是否有百胜组件 有就请求bs订单接口
|
|
1517
|
-
hasBs = HasFilterHandle(templateDetail, ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING', 'BS_SYSTEM_ORDER', 'BS_DELIVERY_NO']);
|
|
1581
|
+
hasBs = HasFilterHandle(templateDetail, ['BS_SIGNING_TIME', 'BS_SEND_TIME', 'BS_TRADE_PAYMENT_TIME', 'BS_NET_RECEIPTS', 'BS_PACKAGE_WEIGHT', 'BS_GOODS', 'BS_DEPOSIT', 'BS_LOGISTICS', 'BS_SEND_GOOD', 'BS_POSTING', 'BS_SYSTEM_ORDER', 'BS_DELIVERY_NO']); //判断是否有旺店通组件 有就请求wdt订单接口
|
|
1582
|
+
hasWdt = HasFilterHandle(templateDetail, ['WDT_SYSTEM_ORDER', 'WDT_GOODS', 'WDT_LOGISTICS', 'WDT_SEND_GOOD'
|
|
1583
|
+
// 'WDT_SIGNING_TIME',
|
|
1584
|
+
// 'WDT_SEND_TIME',
|
|
1585
|
+
// 'WDT_TRADE_PAYMENT_TIME',
|
|
1586
|
+
// 'WDT_NET_RECEIPTS',
|
|
1587
|
+
// 'WDT_PACKAGE_WEIGHT',
|
|
1588
|
+
// 'WDT_DEPOSIT',
|
|
1589
|
+
// 'WDT_POSTING',
|
|
1590
|
+
// 'WDT_DELIVERY_NO',
|
|
1591
|
+
]); //判断是否有万里牛组件 有就请求wln订单接口
|
|
1518
1592
|
hasWln = HasFilterHandle(templateDetail, ['WLN_SYSTEM_ORDER', 'WLN_GOODS', 'WLN_LOGISTICS', 'WLN_SEND_GOOD']); //如果不是对接店铺且百胜组件都没有
|
|
1519
|
-
if (!(!JOIN_SHOP && !hasBs && !hasWln)) {
|
|
1520
|
-
_context.next =
|
|
1593
|
+
if (!(!JOIN_SHOP && !hasBs && !hasWln && !hasWdt)) {
|
|
1594
|
+
_context.next = 7;
|
|
1521
1595
|
break;
|
|
1522
1596
|
}
|
|
1523
1597
|
return _context.abrupt("return");
|
|
1524
|
-
case
|
|
1598
|
+
case 7:
|
|
1525
1599
|
_ref3 = shopList.find(function (item) {
|
|
1526
1600
|
return item.shopId == shopId;
|
|
1527
1601
|
}) || {}, shopSourceStr = _ref3.shopSourceStr, _ref3$thirdUserNick = _ref3.thirdUserNick, thirdUserNick = _ref3$thirdUserNick === void 0 ? '' : _ref3$thirdUserNick;
|
|
1528
|
-
_context.prev =
|
|
1602
|
+
_context.prev = 8;
|
|
1529
1603
|
promise = [];
|
|
1530
1604
|
if (!JOIN_SHOP) {
|
|
1531
1605
|
promise.push(new Promise(function (resolve) {
|
|
@@ -1576,21 +1650,32 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1576
1650
|
resolve({});
|
|
1577
1651
|
}));
|
|
1578
1652
|
}
|
|
1579
|
-
|
|
1653
|
+
if (hasWdt) {
|
|
1654
|
+
promise.push(wdtOrderDetail({
|
|
1655
|
+
billNo: order_no
|
|
1656
|
+
}));
|
|
1657
|
+
} else {
|
|
1658
|
+
promise.push(new Promise(function (resolve) {
|
|
1659
|
+
resolve([]);
|
|
1660
|
+
}));
|
|
1661
|
+
}
|
|
1662
|
+
_context.next = 18;
|
|
1580
1663
|
return Promise.allSettled(promise);
|
|
1581
|
-
case
|
|
1664
|
+
case 18:
|
|
1582
1665
|
_yield$Promise$allSet = _context.sent;
|
|
1583
|
-
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet,
|
|
1666
|
+
_yield$Promise$allSet2 = _slicedToArray(_yield$Promise$allSet, 5);
|
|
1584
1667
|
data = _yield$Promise$allSet2[0];
|
|
1585
1668
|
jstOrder = _yield$Promise$allSet2[1];
|
|
1586
1669
|
bsOrder = _yield$Promise$allSet2[2];
|
|
1587
1670
|
wlnOrder = _yield$Promise$allSet2[3];
|
|
1671
|
+
wdtOrder = _yield$Promise$allSet2[4];
|
|
1588
1672
|
orderInfo = (data === null || data === void 0 ? void 0 : (_data$value = data.value) === null || _data$value === void 0 ? void 0 : _data$value.data) || {};
|
|
1589
1673
|
jstInfo = (jstOrder === null || jstOrder === void 0 ? void 0 : (_jstOrder$value = jstOrder.value) === null || _jstOrder$value === void 0 ? void 0 : (_jstOrder$value$data = _jstOrder$value.data) === null || _jstOrder$value$data === void 0 ? void 0 : _jstOrder$value$data.orders) || [];
|
|
1590
1674
|
bsOrders = (bsOrder === null || bsOrder === void 0 ? void 0 : (_bsOrder$value = bsOrder.value) === null || _bsOrder$value === void 0 ? void 0 : _bsOrder$value.data) || {};
|
|
1591
1675
|
wlnOrders = (wlnOrder === null || wlnOrder === void 0 ? void 0 : (_wlnOrder$value = wlnOrder.value) === null || _wlnOrder$value === void 0 ? void 0 : _wlnOrder$value.data) || {};
|
|
1676
|
+
wdtOrders = (wdtOrder === null || wdtOrder === void 0 ? void 0 : (_wdtOrder$value = wdtOrder.value) === null || _wdtOrder$value === void 0 ? void 0 : _wdtOrder$value.data) || {};
|
|
1592
1677
|
Monitor.automaticReport({
|
|
1593
|
-
message: "orderBack:\u8BA2\u5355\u53F7:".concat(order_no, ",\u5E97\u94FAid:").concat(shopId, ", \u8BA2\u5355\u4FE1\u606F\uFF1A").concat(JSON.stringify(orderInfo), ",jst\u4FE1\u606F:").concat(JSON.stringify(jstInfo), ",bs\u4FE1\u606F:").concat(JSON.stringify(bsOrders), ",wln\u4FE1\u606F:").concat(JSON.stringify(wlnOrders))
|
|
1678
|
+
message: "orderBack:\u8BA2\u5355\u53F7:".concat(order_no, ",\u5E97\u94FAid:").concat(shopId, ", \u8BA2\u5355\u4FE1\u606F\uFF1A").concat(JSON.stringify(orderInfo), ",jst\u4FE1\u606F:").concat(JSON.stringify(jstInfo), ",bs\u4FE1\u606F:").concat(JSON.stringify(bsOrders), ",wln\u4FE1\u606F:").concat(JSON.stringify(wlnOrders), ",wdt\u4FE1\u606F:").concat(JSON.stringify(wdtOrders))
|
|
1594
1679
|
});
|
|
1595
1680
|
if (plat !== null && plat !== void 0 && plat.subOrderNo) {
|
|
1596
1681
|
bsOrders.orders = bsOrders.orders.filter(function (item) {
|
|
@@ -1599,6 +1684,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1599
1684
|
}
|
|
1600
1685
|
bsInfo = bsOrderTransform(bsOrders || {});
|
|
1601
1686
|
wlnInfo = wlnOrderTransform(wlnOrders || {});
|
|
1687
|
+
wdtInfo = wdtOrderTransform(wdtOrders || {});
|
|
1602
1688
|
if ((bsOrders === null || bsOrders === void 0 ? void 0 : (_bsOrders$orders = bsOrders.orders) === null || _bsOrders$orders === void 0 ? void 0 : _bsOrders$orders.length) > 1) {
|
|
1603
1689
|
bsInfo.bsGoods = _objectSpread(_objectSpread({}, bsInfo.bsGoods), {}, {
|
|
1604
1690
|
bsGoods: []
|
|
@@ -1628,13 +1714,23 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1628
1714
|
sendName: ''
|
|
1629
1715
|
}];
|
|
1630
1716
|
}
|
|
1717
|
+
// if (wdtOrders?.orders?.length > 1) {
|
|
1718
|
+
// wdtInfo.bsGoods = {
|
|
1719
|
+
// ...wdtInfo.bsGoods,
|
|
1720
|
+
// bsGoods: [],
|
|
1721
|
+
// };
|
|
1722
|
+
// wdtInfo.bsLogistics = [{ logisticsCompany: null, logisticsCode: '' }];
|
|
1723
|
+
// wdtInfo.bsSendGood = [{ sendId: '', sendName: '' }];
|
|
1724
|
+
// wdtInfo.bsDeliveryNo = [{ deliveryNo: '' }];
|
|
1725
|
+
// }
|
|
1631
1726
|
|
|
1632
1727
|
//获取当前表单字段
|
|
1633
1728
|
formValue = form.getFieldsValue();
|
|
1634
1729
|
detail = _objectSpread(_objectSpread({}, orderInfo), {}, {
|
|
1635
1730
|
jstItemList: jstInfo,
|
|
1636
1731
|
bsOrder: bsInfo,
|
|
1637
|
-
wlnOrder: wlnInfo
|
|
1732
|
+
wlnOrder: wlnInfo,
|
|
1733
|
+
wdtOrder: wdtInfo
|
|
1638
1734
|
}); //抖音数据特殊处理
|
|
1639
1735
|
if (shopSourceStr === 'FXG') {
|
|
1640
1736
|
detail = updateDYDetails(detail);
|
|
@@ -1645,7 +1741,7 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1645
1741
|
hasSelectItem = HasErpItemSelectHandle(templateDetail);
|
|
1646
1742
|
erpPromiseList = [];
|
|
1647
1743
|
if (!(shopSourceStr === 'TAOBAO' && hasSelectItem)) {
|
|
1648
|
-
_context.next =
|
|
1744
|
+
_context.next = 55;
|
|
1649
1745
|
break;
|
|
1650
1746
|
}
|
|
1651
1747
|
list = detail['itemList'];
|
|
@@ -1663,10 +1759,10 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1663
1759
|
resolve({});
|
|
1664
1760
|
});
|
|
1665
1761
|
});
|
|
1666
|
-
_context.prev =
|
|
1667
|
-
_context.next =
|
|
1762
|
+
_context.prev = 45;
|
|
1763
|
+
_context.next = 48;
|
|
1668
1764
|
return Promise.all(promises);
|
|
1669
|
-
case
|
|
1765
|
+
case 48:
|
|
1670
1766
|
erpPromiseList = _context.sent;
|
|
1671
1767
|
detail['itemList'] = (_detail$itemList = detail['itemList']) === null || _detail$itemList === void 0 ? void 0 : _detail$itemList.map(function (item, index) {
|
|
1672
1768
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
@@ -1676,13 +1772,13 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1676
1772
|
})
|
|
1677
1773
|
});
|
|
1678
1774
|
});
|
|
1679
|
-
_context.next =
|
|
1775
|
+
_context.next = 55;
|
|
1680
1776
|
break;
|
|
1681
|
-
case
|
|
1682
|
-
_context.prev =
|
|
1683
|
-
_context.t0 = _context["catch"](
|
|
1777
|
+
case 52:
|
|
1778
|
+
_context.prev = 52;
|
|
1779
|
+
_context.t0 = _context["catch"](45);
|
|
1684
1780
|
console.error('调用erp获取宝贝编码错误', _context.t0);
|
|
1685
|
-
case
|
|
1781
|
+
case 55:
|
|
1686
1782
|
// console.log('detail', detail);
|
|
1687
1783
|
values = orderBackFormValues({
|
|
1688
1784
|
detail: detail,
|
|
@@ -1707,23 +1803,23 @@ export var orderBack = /*#__PURE__*/function () {
|
|
|
1707
1803
|
sessionStorage.setItem('cacheOmsOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, cacheOrderInfo), {}, _defineProperty({}, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, plat === null || plat === void 0 ? void 0 : plat.subOrderNo, _objectSpread(_objectSpread({}, formValue), values))))));
|
|
1708
1804
|
} else {
|
|
1709
1805
|
_cacheOrderInfo = JSON.parse(sessionStorage.getItem('cacheOrderInfo') || '{}');
|
|
1710
|
-
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (
|
|
1806
|
+
sessionStorage.setItem('cacheOrderInfo', JSON.stringify(_objectSpread(_objectSpread({}, _cacheOrderInfo), {}, (_objectSpread70 = {}, _defineProperty(_objectSpread70, order_no, values), _defineProperty(_objectSpread70, "".concat(templateDetail.flowTemplateConfig.flowTemplateId, "-").concat(plat.buyerId), _defineProperty({}, order_no, _objectSpread(_objectSpread({}, formValue), values))), _objectSpread70))));
|
|
1711
1807
|
}
|
|
1712
1808
|
}
|
|
1713
1809
|
// console.log('orderback', values);
|
|
1714
1810
|
form.setFieldsValue(_objectSpread(_objectSpread({}, formValue), values));
|
|
1715
1811
|
callback === null || callback === void 0 ? void 0 : callback(detail, templateDetail);
|
|
1716
|
-
_context.next =
|
|
1812
|
+
_context.next = 64;
|
|
1717
1813
|
break;
|
|
1718
|
-
case
|
|
1719
|
-
_context.prev =
|
|
1720
|
-
_context.t1 = _context["catch"](
|
|
1814
|
+
case 61:
|
|
1815
|
+
_context.prev = 61;
|
|
1816
|
+
_context.t1 = _context["catch"](8);
|
|
1721
1817
|
console.error(_context.t1);
|
|
1722
|
-
case
|
|
1818
|
+
case 64:
|
|
1723
1819
|
case "end":
|
|
1724
1820
|
return _context.stop();
|
|
1725
1821
|
}
|
|
1726
|
-
}, _callee, null, [[
|
|
1822
|
+
}, _callee, null, [[8, 61], [45, 52]]);
|
|
1727
1823
|
}));
|
|
1728
1824
|
return function orderBack(_x) {
|
|
1729
1825
|
return _ref2.apply(this, arguments);
|
|
@@ -2027,6 +2123,7 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
2027
2123
|
case 'BS_REISSUE_GOODS':
|
|
2028
2124
|
case 'BS_EXCHANGE_GOODS':
|
|
2029
2125
|
case 'BS_RETURN_GOODS':
|
|
2126
|
+
case 'WDT_REISSUE_GOODS':
|
|
2030
2127
|
prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
|
|
2031
2128
|
break;
|
|
2032
2129
|
case 'BS_DELIVERY_NO':
|
|
@@ -2041,6 +2138,10 @@ export var reversalFormValues = function reversalFormValues() {
|
|
|
2041
2138
|
case 'EXCHANGE_TRADE_ID':
|
|
2042
2139
|
prv["".concat(next.uniqueKey, "_tradeItemList")] = JSON.stringify(values[next.uniqueKey] || []);
|
|
2043
2140
|
break;
|
|
2141
|
+
case 'WDT_GOODS':
|
|
2142
|
+
prv["".concat(next.uniqueKey, "_wdtGoods")] = JSON.stringify(values[next.uniqueKey]['wdtGoods']);
|
|
2143
|
+
prv["".concat(next.uniqueKey, "_shopCode")] = values[next.uniqueKey]['shopCode'];
|
|
2144
|
+
break;
|
|
2044
2145
|
}
|
|
2045
2146
|
return prv;
|
|
2046
2147
|
}, {});
|
|
@@ -2121,6 +2222,29 @@ export var wlnSystemOrderBackValues = function wlnSystemOrderBackValues(_ref7) {
|
|
|
2121
2222
|
form.setFieldsValue(values);
|
|
2122
2223
|
};
|
|
2123
2224
|
|
|
2225
|
+
// wdt商品信息返填
|
|
2226
|
+
export var wdtSystemOrderBackValues = function wdtSystemOrderBackValues(_ref8) {
|
|
2227
|
+
var _templateList$compone3;
|
|
2228
|
+
var templateList = _ref8.templateList,
|
|
2229
|
+
value = _ref8.value,
|
|
2230
|
+
form = _ref8.form;
|
|
2231
|
+
//如果没有选择的值不返填,会有两种情况 1.有值为空 2.没有值 为空的时候需要返填
|
|
2232
|
+
if (!(value !== null && value !== void 0 && value.selectedRows)) return;
|
|
2233
|
+
var wdtGoodsComponent = (_templateList$compone3 = templateList.componentDtoList) === null || _templateList$compone3 === void 0 ? void 0 : _templateList$compone3.filter(function (item) {
|
|
2234
|
+
return ['WDT_GOODS', 'WDT_DELIVERY_NO', 'WDT_SEND_GOOD', 'WDT_LOGISTICS'].includes(item.workOrderComponentType);
|
|
2235
|
+
});
|
|
2236
|
+
if (!(wdtGoodsComponent !== null && wdtGoodsComponent !== void 0 && wdtGoodsComponent.length)) return;
|
|
2237
|
+
var wdtGoodsValue = form.getFieldValue(wdtGoodsComponent[0].uniqueKey);
|
|
2238
|
+
var orderInfo = wdtOrderTransform({
|
|
2239
|
+
trades: value.selectedRows,
|
|
2240
|
+
shopCode: wdtGoodsValue.shopCode
|
|
2241
|
+
});
|
|
2242
|
+
var values = wdtOrderBackFormValues(orderInfo, {
|
|
2243
|
+
componentDtoList: wdtGoodsComponent
|
|
2244
|
+
});
|
|
2245
|
+
form.setFieldsValue(values);
|
|
2246
|
+
};
|
|
2247
|
+
|
|
2124
2248
|
// 获取映射关系
|
|
2125
2249
|
export var getMappingConfigByTemplateDetail = function getMappingConfigByTemplateDetail(templateDetail) {
|
|
2126
2250
|
var readonlyComponents = {};
|
|
@@ -2195,12 +2319,12 @@ export var transformWorkOrderDetail = function transformWorkOrderDetail(detail)
|
|
|
2195
2319
|
};
|
|
2196
2320
|
|
|
2197
2321
|
// 返填物流轨迹信息
|
|
2198
|
-
export var setLogisticsInfo = function setLogisticsInfo(
|
|
2199
|
-
var logisticsMappingConfig =
|
|
2200
|
-
uniqueKey =
|
|
2201
|
-
workOrderComponentType =
|
|
2202
|
-
value =
|
|
2203
|
-
form =
|
|
2322
|
+
export var setLogisticsInfo = function setLogisticsInfo(_ref9) {
|
|
2323
|
+
var logisticsMappingConfig = _ref9.logisticsMappingConfig,
|
|
2324
|
+
uniqueKey = _ref9.uniqueKey,
|
|
2325
|
+
workOrderComponentType = _ref9.workOrderComponentType,
|
|
2326
|
+
value = _ref9.value,
|
|
2327
|
+
form = _ref9.form;
|
|
2204
2328
|
var values = logisticsMappingConfig.reduce(function (prv, next) {
|
|
2205
2329
|
var logisticsValues = form.getFieldValue(next.uniqueKey);
|
|
2206
2330
|
var componentConfig = next.componentConfig;
|
|
@@ -6,6 +6,7 @@ export declare const selectFlowList: ((state: {
|
|
|
6
6
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
7
7
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
8
8
|
logicFlow: import("./types").LogicFlowState;
|
|
9
|
+
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
9
10
|
}) => import("./types").LogicFlow[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").LogicFlow[], {
|
|
10
11
|
clearCache: () => void;
|
|
11
12
|
}> & {
|
|
@@ -19,6 +20,7 @@ export declare const selectGroupFlowList: ((state: {
|
|
|
19
20
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
20
21
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
21
22
|
logicFlow: import("./types").LogicFlowState;
|
|
23
|
+
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
22
24
|
}) => import("./types").Option[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").Option[], {
|
|
23
25
|
clearCache: () => void;
|
|
24
26
|
}> & {
|
|
@@ -32,6 +34,7 @@ export declare const selectFlowTemplateGroupWorkOrderTemplateList: ((state: {
|
|
|
32
34
|
paymentWorkOrder: import("../paymentWorkOrder/types").PaymentWorkOrderState;
|
|
33
35
|
singleWorkOrder: import("../singleShopWorkOrder/types").SingleWorkOrderState;
|
|
34
36
|
logicFlow: import("./types").LogicFlowState;
|
|
37
|
+
flowWOrkOrderDetail: import("../flowTemplateDetail/types").FlowTemplateDetailState;
|
|
35
38
|
}) => import("./types").Option[]) & import("reselect").OutputSelectorFields<(args_0: import("./types").LogicFlowState) => import("./types").Option[], {
|
|
36
39
|
clearCache: () => void;
|
|
37
40
|
}> & {
|
|
@@ -59,6 +59,7 @@ export declare const queryAllWorkOrderList: (s: string, data: any) => Promise<an
|
|
|
59
59
|
export declare const getAlipayBillReceipt: (data: any) => Promise<any>;
|
|
60
60
|
export declare const jstOrderDetail: (data: any) => Promise<any>;
|
|
61
61
|
export declare const bsOrderDetail: (data: any) => Promise<any>;
|
|
62
|
+
export declare const wdtOrderDetail: (data: any) => Promise<any>;
|
|
62
63
|
export declare const getRepeatWorkOrderList: (data: any) => Promise<any>;
|
|
63
64
|
export declare const logisticsInterceptCancel: (data: any) => Promise<any>;
|
|
64
65
|
export declare const queryLogisticsTrack: (data: any) => Promise<any>;
|
|
@@ -370,6 +370,16 @@ export var bsOrderDetail = function bsOrderDetail(data) {
|
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
372
|
|
|
373
|
+
// wdt订单详情
|
|
374
|
+
export var wdtOrderDetail = function wdtOrderDetail(data) {
|
|
375
|
+
return request({
|
|
376
|
+
url: '/qy/gdfw/order/wdtOrderDetail',
|
|
377
|
+
method: 'post',
|
|
378
|
+
data: data,
|
|
379
|
+
infoLevel: 'warning'
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
|
|
373
383
|
// 获取重复详情
|
|
374
384
|
export var getRepeatWorkOrderList = function getRepeatWorkOrderList(data) {
|
|
375
385
|
return request({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/kmkf-work-order-service-component",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2-beta.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/icons": "^4.7.0",
|
|
35
|
-
"@kmkf-fe-packages/basic-components": "^0.24.
|
|
36
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.24.
|
|
37
|
-
"@kmkf-fe-packages/services-components": "^0.24.
|
|
35
|
+
"@kmkf-fe-packages/basic-components": "^0.24.2-beta.0",
|
|
36
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.24.2-beta.0",
|
|
37
|
+
"@kmkf-fe-packages/services-components": "^0.24.2-beta.0",
|
|
38
38
|
"@reduxjs/toolkit": "^1.8.5",
|
|
39
39
|
"ahooks": "^3.7.4",
|
|
40
40
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "30399e50d7f31f367632061e59ef94ca56deaf2c",
|
|
77
77
|
"gitHooks": {
|
|
78
78
|
"pre-commit": "lint-staged"
|
|
79
79
|
}
|